diff options
Diffstat (limited to '.github/workflows/promote.yml')
-rw-r--r-- | .github/workflows/promote.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml new file mode 100644 index 0000000000..3955d7fcd7 --- /dev/null +++ b/.github/workflows/promote.yml @@ -0,0 +1,26 @@ +--- +name: Promote Release +on: + release: + types: [published] + +jobs: + promote: + runs-on: ubuntu-latest + steps: + - name: Log in to GHCR + run: | + echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Log in to Quay + run: | + echo ${{ secrets.QUAY_TOKEN }} | docker login quay.io -u ${{ secrets.QUAY_USER }} --password-stdin + + - name: Re-tag and promote awx image + run: | + docker pull ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} + docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:${{ github.event.release.tag_name }} + docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:latest + docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }} + docker push quay.io/${{ github.repository }}:latest + |