edit build.yml - try if for tag
Build and Push Docker Image / build_and_push (push) Failing after 39s Details

This commit is contained in:
Nicolas CARON 2024-04-03 10:59:18 +02:00
parent 140d366894
commit d2a8c57274
1 changed files with 5 additions and 6 deletions

View File

@ -41,18 +41,17 @@ jobs:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Determine if it's a tag or a branch
id: tag_or_branch
run: echo ::set-output name=is_tag::$(if [[ $GITHUB_REF == refs/tags/* ]]; then echo true; else echo false; fi)
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
git.coopgo.io/${{gitea.repository}}:${{gitea.ref_name}}
type=ref,event=tag
flavor: |
latest=true
prefix=
suffix=
git.coopgo.io/${{gitea.repository}}:${{gitea.ref_name}}${{ steps.tag_or_branch.outputs.is_tag == 'true' ? '' : ',latest' }}
build-args: |
ACCESS_TOKEN_USR=${{gitea.actor}}
ACCESS_TOKEN_PWD=${{gitea.token}}