Skip to content

Commit

Permalink
Merge pull request #4612 from mozilla/MNTOR-3243
Browse files Browse the repository at this point in the history
MNTOR-3243: rework release retag
  • Loading branch information
mansaj authored May 30, 2024
2 parents ef70a56 + ac6f217 commit f69f4ea
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/release.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release_retag.yaml
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 }}

0 comments on commit f69f4ea

Please sign in to comment.