edit build.yml - try if for tag
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 39s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 39s
This commit is contained in:
@@ -41,18 +41,17 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
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
|
- 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}}
|
git.coopgo.io/${{gitea.repository}}:${{gitea.ref_name}}${{ steps.tag_or_branch.outputs.is_tag == 'true' ? '' : ',latest' }}
|
||||||
type=ref,event=tag
|
|
||||||
flavor: |
|
|
||||||
latest=true
|
|
||||||
prefix=
|
|
||||||
suffix=
|
|
||||||
build-args: |
|
build-args: |
|
||||||
ACCESS_TOKEN_USR=${{gitea.actor}}
|
ACCESS_TOKEN_USR=${{gitea.actor}}
|
||||||
ACCESS_TOKEN_PWD=${{gitea.token}}
|
ACCESS_TOKEN_PWD=${{gitea.token}}
|
||||||
|
|||||||
Reference in New Issue
Block a user