-
Notifications
You must be signed in to change notification settings - Fork 19
39 lines (32 loc) · 1.06 KB
/
deploy.yml
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: ./openshift
env:
TAG_NAME: "${{ github.event.inputs.environment || 'test' }}" # If the environment type is manually selected, use the input value; otherwise, use 'test' as default
OPENSHIFT_LOGIN_REGISTRY: ${{ secrets.OPENSHIFT_LOGIN_REGISTRY }}
OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT_SA_TOKEN }}
OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT_REPOSITORY }}
jobs:
met-deployment:
runs-on: ubuntu-20.04
environment:
name: ${{ github.event.inputs.environment }}
steps:
- uses: actions/checkout@v3
- name: Login Openshift
shell: bash
run: |
oc login --server=${{env.OPENSHIFT_LOGIN_REGISTRY}} --token=${{env.OPENSHIFT_SA_TOKEN}}
- name: Tag Images and Rollout
shell: bash
run: |
sh deploy.sh ${{ github.event.inputs.environment }} ${{env.OPENSHIFT_REPOSITORY }}