Skip to content

Commit

Permalink
Update prod release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Mar 12, 2024
1 parent eae855d commit 8a8516a
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
name: Prod Deploy
name: PROD Release

on:
release:
types: [published]
workflow_dispatch:

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

jobs:
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/action-get-pr@v0.0.1

deploys:
name: PROD Deployments
environment: prod
Expand All @@ -18,35 +32,34 @@ jobs:
include:
- name: frontend
file: frontend/openshift.nginx.deploy.yml
overwrite: true
- name: rctool
file: frontend/openshift.deploy.yml
overwrite: true
steps:
- uses: bcgov-nr/action-deployer-openshift@v2.1.0
with:
file: ${{ matrix.file }}
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_server: ${{ secrets.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: ${{ matrix.overwrite }}
overwrite: true
parameters:
-p ZONE=prod -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
-p NAME=${{ github.event.repository.name }} ${{ matrix.parameters }}
penetration_test: false

image-promotions:
name: Promote images to PROD
needs:
- deploys
name: Promote Images
needs: [vars, deploys]
permissions:
packages: write
runs-on: ubuntu-22.04
strategy:
matrix:
component: [frontend, rctool]
package: [frontend, rctool]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
repository: ${{ github.repository }}/${{ matrix.package }}
target: test
tags: prod
target: ${{ needs.vars.outputs.pr }}

0 comments on commit 8a8516a

Please sign in to comment.