Skip to content

Commit

Permalink
trigger workflow on tag created
Browse files Browse the repository at this point in the history
  • Loading branch information
jamcole committed Oct 22, 2023
1 parent ade8f47 commit d69ea1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- cron: '38 1 * * *'
push:
branches: [ "main" ]
tags:
tags: [ 'v*.*.*.*', 'v*.*.*', 'v*.*', 'v*' ]
pull_request:
branches: [ "main" ]

Expand Down Expand Up @@ -84,9 +86,9 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
type=sha
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=semver,pattern={{raw}}
type=raw,value=latest,enable={{is_default_branch}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down
4 changes: 2 additions & 2 deletions taskfile.dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ tasks:
run: always
cmds:
- git pull --tags -f
- git add src/resources
- git commit -m "version update" --only src/resources || true
- git add .
- git commit -m "version update" || true
- git show-ref --tags v$(cat src/resources/bedrock-version.txt) --quiet && git tag v$(cat src/resources/bedrock-version.txt)-$(date +%s) || git tag v$(cat src/resources/bedrock-version.txt)
- git push origin --tags
deps:
Expand Down

0 comments on commit d69ea1f

Please sign in to comment.