-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4612 from mozilla/MNTOR-3243
MNTOR-3243: rework release retag
- Loading branch information
Showing
2 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Retag and Push Docker Image on Release | ||
# GH release should always create a tag automatically | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
retag-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: mozilla/blurts-server | ||
tags: type=sha,format=short,prefix= | ||
|
||
- name: Pull Docker image with commit tag | ||
run: docker pull ${{ steps.meta.outputs.tags }} | ||
|
||
- name: Tag Docker image with release tag | ||
run: docker tag ${{ steps.meta.outputs.tags }} mozilla/blurts-server:${{ github.ref_name }} | ||
|
||
- name: Push Docker image with release tag | ||
run: docker push mozilla/blurts-server:${{ github.ref_name }} |