Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): create and consume test tags #758

Merged
merged 7 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
18 changes: 18 additions & 0 deletions .github/workflows/merge-main.yml → .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,21 @@ jobs:
logout_chain_url: https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=
target: test
url: fom-test.nrs.gov.bc.ca

images-promote:
name: Promote images (TEST)
continue-on-error: true # If no prod tags
needs: [deploy]
permissions:
packages: write
runs-on: ubuntu-24.04
strategy:
matrix:
component: [api, admin, db, public]
steps:
- uses: shrink/actions-docker-registry-tag@v4
Dismissed Show dismissed Hide dismissed
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
target: ${{ needs.deploy.outputs.tag }}
tags: test
21 changes: 7 additions & 14 deletions .github/workflows/release.yml → .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
name: PROD (release)
name: PROD (dispatch)

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Container tag; usually prod or PR number, can be omitted
type: string
workflow_call:
inputs:
tag:
description: Container tag; usually prod or PR number, can be omitted
description: Container tag; usually test, prod or PR number
default: test
DerekRoberts marked this conversation as resolved.
Show resolved Hide resolved
required: true
DerekRoberts marked this conversation as resolved.
Show resolved Hide resolved
type: string

concurrency:
Expand Down Expand Up @@ -55,7 +50,7 @@ jobs:

images-promote:
name: Promote images (PROD)
needs: [deploy, images-backup]
needs: [images-backup]
permissions:
packages: write
runs-on: ubuntu-24.04
Expand All @@ -67,7 +62,5 @@ jobs:
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
target: ${{ needs.deploy.outputs.tag }}
tags: |
prod
${{ github.event.release.tag_name }}
target: ${{ inputs.tag }}
tags: prod
Loading