From c784657da28a18850bf0d025637a5e62cb5ff93c Mon Sep 17 00:00:00 2001 From: Nicolas Caron Date: Wed, 3 Apr 2024 11:23:59 +0200 Subject: [PATCH] edit build.yml - add metadata step --- .gitea/workflows/build.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 9c9704a..2406e0d 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -41,15 +41,22 @@ jobs: username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Extract metadata (tags, labels) for Docker image + id: metadata + uses: docker/metadata-action@v3 + with: + images: git.coopgo.io/${{gitea.repository}} + tags: ${{gitea.ref_name}} + flavor: | + latest=auto + - name: Build and push uses: docker/build-push-action@v5 with: context: . push: true tags: | - git.coopgo.io/${{gitea.repository}}:${{ gitea.ref_name }} - flavor: | - latest=auto + ${{ steps.metadata.outputs.tags }} build-args: | ACCESS_TOKEN_USR=${{gitea.actor}} ACCESS_TOKEN_PWD=${{gitea.token}}