-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.46 KB
/
deploy_prod.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This action should:
# - trigger on merge of pr
# - tag the master with the image tag
# - deploy to prod
#
# https://github.community/t/run-action-only-when-a-pr-is-merged/18268
name: deploy prod
on:
pull_request:
branches:
- main
types:
- closed
# debugging
# -------------
# on:
# push:
# branches: ['dev', 'smk-cdci']
jobs:
deployprod:
# Commented out for testing
if: github.event.pull_request.merged == true
defaults:
run:
shell: bash
runs-on: ubuntu-latest
env:
OPENSHIFT_SERVER_URL: ${{secrets.OPENSHIFT_SERVER_URL}}
OPENSHIFT_TOKEN_DEV: ${{secrets.OPENSHIFT_TOKEN_DEV}}
OPENSHIFT_TOKEN_PROD: ${{secrets.OPENSHIFT_TOKEN_PROD}}
GHCR_USER: ${{ secrets.GHCR_USER }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
steps:
# CHECKOUT THE CODE
#
- uses: actions/checkout@v4
id: checkout
with:
fetch-depth: 0
- name: deploying prod
uses: bcgov/smk-actions/smk-deploy@main
id: deploySMKContainer
with:
OPENSHIFT_SERVER_URL: ${{ secrets.OPENSHIFT_SERVER_URL }}
OPENSHIFT_TOKEN_DEV: ${{ secrets.OPENSHIFT_TOKEN_DEV }}
OPENSHIFT_TOKEN_PROD: ${{ secrets.OPENSHIFT_TOKEN_PROD }}
GHCR_USER: ${{ secrets.GHCR_USER }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
DOCKER_REGISTRY: 'ghcr.io'
PR_REVIEWERS: '["michaelpnelson"]'
PR_MENTIONS: '["michaelpnelson", "GuyTheFlower", "franTarkenton"]'