Use direct docker commands in Gitea workflow
Build and push image / build (push) Failing after 5s

This commit is contained in:
alexandrev-tibco
2026-05-03 11:50:19 +02:00
parent 0e07008a31
commit 426aa3ce70
+14 -15
View File
@@ -25,20 +25,19 @@ jobs:
echo "latest_tag=${REGISTRY}/${IMAGE_NAME}:latest" >> "$GITHUB_OUTPUT"
- name: Login to Gitea registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
run: |
printf '%s' "${{ secrets.REGISTRY_TOKEN }}" \
| docker login "${REGISTRY}" \
--username "${{ secrets.REGISTRY_USERNAME }}" \
--password-stdin
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.sha_tag }}
${{ steps.meta.outputs.latest_tag }}
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
run: |
docker build \
--label "org.opencontainers.image.source=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \
--label "org.opencontainers.image.revision=${GITHUB_SHA}" \
--tag "${{ steps.meta.outputs.sha_tag }}" \
--tag "${{ steps.meta.outputs.latest_tag }}" \
.
docker push "${{ steps.meta.outputs.sha_tag }}"
docker push "${{ steps.meta.outputs.latest_tag }}"