-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.28 KB
/
DeployToDEVFeature.yml
File metadata and controls
35 lines (34 loc) · 1.28 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
name: DEPLOY-TO-DEV-FEATURE
on:
# Trigger the workflow on push to the master branch
pull_request:
types: [assigned, opened, synchronize, reopened]
branches:
- develop
jobs:
one:
name: Deploy to Openshift
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_HEAD_REF | cut -d / -f 3) # GITHUB_HEAD_REF is only initiated when trigger is pull request.
- name: GitHub context
run: echo '${{ steps.get_version.outputs.VERSION }}'
- name: OpenShift Action
uses: redhat-developer/openshift-actions@v1.1
env:
PROJECT: 551bf1-dev
REF: ${{ steps.get_version.outputs.VERSION }}
with:
version: 'latest'
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_URL }}
parameters: '{"apitoken": "${{ secrets.API_TOKEN }}", "acceptUntrustedCerts": "true"}'
#parameters: '{"username": "${{ secrets.USERNAME }}", "password": "${{ secrets.PASSWORD }}", "acceptUntrustedCerts": "true"}'
cmd: |
'version'
'project ${PROJECT}'
'start-build workbc-helpbot --commit=${REF} --follow'
'status'