Skip to content

Commit

Permalink
Also publish a moving tag for the major version
Browse files Browse the repository at this point in the history
e.g. helm:3
  • Loading branch information
schnatterer committed Oct 26, 2023
1 parent 0fd8d1e commit 4ab9a4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publishImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -20,7 +20,8 @@ jobs:
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${TAGS},${GHCR_IMAGE}:${VERSION}"
MAJOR_VERSION=$(echo $VERSION | cut -d '.' -f 1 | tr -d 'v')
TAGS="${TAGS},${GHCR_IMAGE}:${VERSION},${GHCR_IMAGE}:${MAJOR_VERSION}"
fi
echo "VERSION=${VERSION}" >> $GITHUB_ENV
Expand Down

0 comments on commit 4ab9a4e

Please sign in to comment.