Skip to content

Commit 5d061a9

Browse files
committed
Add steps to major version release to update Docker major tag
1 parent 98742cd commit 5d061a9

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,24 @@ jobs:
5151
outputs:
5252
major_tag: ${{ steps.update-major-tag.outputs.major-tag }}
5353
steps:
54-
- name: Update the ${{ env.TAG_NAME }} tag
55-
id: update-major-tag
56-
uses: actions/[email protected]
57-
with:
58-
source-tag: ${{ env.TAG_NAME }}
59-
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
54+
- name: Update the ${{ env.TAG_NAME }} major tag
55+
id: update-major-tag
56+
uses: actions/[email protected]
57+
with:
58+
source-tag: ${{ env.TAG_NAME }}
59+
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
60+
61+
# Login to the GHCR Docker registry
62+
- name: Log into registry ${{ env.REGISTRY }}
63+
uses: docker/login-action@v2
64+
with:
65+
registry: ${{ env.REGISTRY }}
66+
username: ${{ github.actor }}
67+
password: ${{ secrets.GITHUB_TOKEN }}
68+
69+
- name: Update Docker image tag
70+
env:
71+
NEW_TAG: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.update-major-tag.outputs.major-tag }}
72+
SOURCE_TAG: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }}
73+
run: |
74+
docker buildx imagetools create --tag $NEW_TAG $SOURCE_TAG

0 commit comments

Comments
 (0)