Skip to content

Commit

Permalink
fix: fixing release image promotion (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Gomes da Cruz Junior authored Mar 22, 2023
1 parent 57ca9e6 commit 867454a
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jobs:
- trivy-repo
- sonarcloud
runs-on: ubuntu-22.04
permissions:
contents: write
discussions: write
environment:
name: test
env:
Expand Down Expand Up @@ -186,33 +189,27 @@ jobs:
name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}

- name: Exporting version
run: echo "version=${{ steps.changelog.outputs.tag }}" >> $GITHUB_OUTPUT

image-promotions:
name: Promote images to PROD
needs:
- deploy-test
runs-on: ubuntu-22.04
permissions:
contents: write
discussions: write
strategy:
matrix:
component: [ api, init ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Promoting API
uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/api
target: test
tags: |
prod
latest
${{ steps.changelog.outputs.tag }}
- uses: shrink/actions-docker-registry-tag@v3
- name: Promoting Init
uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
repository: ${{ github.repository }}/init
target: test
tags: |
prod
${{ steps.deploy-test.outputs.version }}
latest
${{ steps.changelog.outputs.tag }}
deploy-prod:
name: PROD Deployment
Expand Down

0 comments on commit 867454a

Please sign in to comment.