Skip to content

Commit

Permalink
feat(Docker): Create additional docker image tags for major and minor…
Browse files Browse the repository at this point in the history
… version (#170)

Adds tags to new Docker images:
A `1.2` tag for targeting minor versions and a `1` tag for targeting major versions.

---------

Signed-off-by: Lukas Grützmacher <[email protected]>
Co-authored-by: seriouz <[email protected]>
  • Loading branch information
lg2de and seriouz authored Aug 7, 2024
1 parent 0f16eaa commit 354f264
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ jobs:
run: |
export GITHUB_REF_NAME="${{ github.ref_name }}"
export RELEASE_VERSION="${GITHUB_REF_NAME#v}"
export RELEASE_MAJOR_VERSION="${RELEASE_VERSION%%.*}"
export remaining_version="${RELEASE_VERSION#*.}"
export RELEASE_MINOR_VERSION="${RELEASE_MAJOR_VERSION}.${remaining_version%%.*}"
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT
echo "RELEASE_MINOR_VERSION=$RELEASE_MINOR_VERSION" >> $GITHUB_OUTPUT
echo "RELEASE_MAJOR_VERSION=$RELEASE_MAJOR_VERSION" >> $GITHUB_OUTPUT
outputs:
RELEASE_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_VERSION }}
RELEASE_MINOR_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_MINOR_VERSION }}
RELEASE_MAJOR_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_MAJOR_VERSION }}

verify:
name: Run tests
Expand Down Expand Up @@ -111,6 +119,8 @@ jobs:
tags: |
bagetter/bagetter:latest
bagetter/bagetter:${{ needs.version.outputs.RELEASE_VERSION }}
bagetter/bagetter:${{ needs.version.outputs.RELEASE_MINOR_VERSION }}
bagetter/bagetter:${{ needs.version.outputs.RELEASE_MAJOR_VERSION }}
build-args: |
Version=${{ needs.version.outputs.RELEASE_VERSION }}
Expand Down

0 comments on commit 354f264

Please sign in to comment.