-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (33 loc) · 1.29 KB
/
deploy.yml
File metadata and controls
39 lines (33 loc) · 1.29 KB
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
name: Deploy
on:
workflow_dispatch:
inputs:
environment:
description: "Environment (test/prod)"
required: true
default: "test"
defaults:
run:
shell: bash
working-directory: ./
jobs:
deployment:
runs-on: ubuntu-22.04
environment:
name: ${{ github.event.inputs.environment }}
steps:
- uses: actions/checkout@v2
- name: Login Openshift
shell: bash
run: |
oc login --server=${{secrets.OPENSHIFT_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT_SA_TOKEN}}
- name: Tag Images and Rollout
shell: bash
run: |
oc project ${{ secrets.OPENSHIFT_REPOSITORY }}-tools
oc tag submit-api:dev submit-api:${{ github.event.inputs.environment }}
oc tag submit-web:dev submit-web:${{ github.event.inputs.environment }}
oc tag submit-cron:dev submit-cron:${{ github.event.inputs.environment }}
oc rollout status dc/submit-api -n ${{ secrets.OPENSHIFT_REPOSITORY }}-${{ github.event.inputs.environment }} -w
oc rollout status dc/submit-web -n ${{ secrets.OPENSHIFT_REPOSITORY }}-${{ github.event.inputs.environment }} -w
oc rollout status dc/submit-cron -n ${{ secrets.OPENSHIFT_REPOSITORY }}-${{ github.event.inputs.environment }} -w