Skip to content

Commit

Permalink
chore: vX major tag
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Aug 22, 2024
1 parent 6ee2ed5 commit 81734c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,27 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

# will generate a git tag => then, used by docker/metadata-action
- name: Semantic Release
id: semantic_release
- id: semantic_release
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 24
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
- name: Update `vX` git tag
run: |
MAJOR_VERSION=${{ steps.semantic_release.outputs.new_release_major_version }}
git tag -fa v$MAJOR_VERSION -m "Update major version tag to v$MAJOR_VERSION"
git push origin v$MAJOR_VERSION --force
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
Expand Down

0 comments on commit 81734c5

Please sign in to comment.