Skip to content

Commit

Permalink
Merge branch 'main' into testing-test-deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Mar 19, 2024
2 parents b1804ad + 897b4e3 commit 4a2cc8a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 10 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
group: test-prod
cancel-in-progress: false

jobs:
deploys-test:
vars:
name: Set Variables
outputs:
pr: ${{ steps.pr.outputs.pr }}
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
# Get PR number for squash merges to main
- name: PR Number
id: pr
uses: bcgov-nr/[email protected]

deploys:
name: TEST Deployments
needs: [vars]
environment: test
runs-on: ubuntu-22.04
strategy:
Expand All @@ -34,5 +47,22 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: true
parameters:
-p ZONE=test -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
-p NAME=${{ github.event.repository.name }}
-p ZONE=test -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ needs.vars.outputs.pr }}

promotions:
name: Promote Images
needs: [deploys, vars]
permissions:
packages: write
runs-on: ubuntu-22.04
strategy:
matrix:
package: [frontend, rctool]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
tags: test
target: ${{ needs.vars.outputs.pr }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
build_file: ${{ matrix.build_file }}
build_context: ./frontend
tag: ${{ github.event.number }}
tag_fallback: test
tag_fallback: latest
token: ${{ secrets.GITHUB_TOKEN }}
triggers: ('frontend/')

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
types: [published]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
group: test-prod
cancel-in-progress: false

jobs:
deploys:
Expand All @@ -30,9 +30,9 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: true
parameters:
-p ZONE=prod -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:latest
-p ZONE=prod -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test

image-promotions:
promotions:
name: Promote Images
needs: [deploys]
permissions:
Expand All @@ -48,4 +48,4 @@ jobs:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
tags: prod
target: latest
target: test

0 comments on commit 4a2cc8a

Please sign in to comment.