Skip to content

Commit

Permalink
chore: fix pipeline for pushing tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Tchoupinax committed Nov 6, 2022
1 parent e94be2e commit fe30517
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/build-image-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: gen_tags
run: |
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
TAGS='["user/image:latest","user/image:'${GITHUB_REF/refs\/tags\//}'"]'
else
TAGS='["user/image:latest"]'
fi
echo '::set-output name=tags::'$TAGS
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: tchoupinax/fuzzy-engine
flavor: latest=true
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: true
tags: tchoupinax/fuzzy-engine:${{ fromJson(steps.gen_tags.outputs.tags) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit fe30517

Please sign in to comment.