edit build.yml - add metadata step
Build and Push Docker Image / build_and_push (push) Successful in 1m38s Details

This commit is contained in:
Nicolas CARON 2024-04-03 11:23:59 +02:00
parent 66c87b16ff
commit c784657da2
1 changed files with 10 additions and 3 deletions

View File

@ -41,15 +41,22 @@ jobs:
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }} 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 - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
tags: | tags: |
git.coopgo.io/${{gitea.repository}}:${{ gitea.ref_name }} ${{ steps.metadata.outputs.tags }}
flavor: |
latest=auto
build-args: | build-args: |
ACCESS_TOKEN_USR=${{gitea.actor}} ACCESS_TOKEN_USR=${{gitea.actor}}
ACCESS_TOKEN_PWD=${{gitea.token}} ACCESS_TOKEN_PWD=${{gitea.token}}