Skip to content

Commit 53105e5

Browse files
committed
push major version with every release
This seems to be common practice within GH actions. This commit will overwrite the v1 tag whenever we release a new version
1 parent 226f8c2 commit 53105e5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: build and push container-image
16-
# TODO also push to the major @v1 versions
1716
run: |
1817
IMAGE_NAME="ghcr.io/simontheleg/semver-tag-from-pr-action"
18+
MAJOR_VERSION=${GITHUB_REF_NAME%%.*}
1919
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
2020
docker build . -t ${IMAGE_NAME}:${GITHUB_REF_NAME}
21+
docker tag ${IMAGE_NAME}:${GITHUB_REF_NAME} ${IMAGE_NAME}:${MAJOR_VERSION}
2122
docker push ${IMAGE_NAME}:${GITHUB_REF_NAME}
23+
docker push ${IMAGE_NAME}:${MAJOR_VERSION}
2224
- name: publish GH release
2325
uses: softprops/action-gh-release@v1
2426
with:

0 commit comments

Comments
 (0)