-
Notifications
You must be signed in to change notification settings - Fork 35
66 lines (57 loc) · 2.13 KB
/
Copy pathverify-pr.yaml
File metadata and controls
66 lines (57 loc) · 2.13 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Verify PR
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
verify:
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip ci' ) }}
runs-on: ubuntu-latest
container: quay.io/ibmgaragecloud/cli-tools:v0.15
strategy:
matrix:
platform:
- ibm_ocp48
stage:
- stages-ocp4
- stages
fail-fast: false
max-parallel: 1
env:
HOME: /home/devops
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Verify deploy of ${{ matrix.stage }} on ${{ matrix.platform }}
uses: cloud-native-toolkit/action-module-verify-deploy@main
with:
clusterId: ${{ matrix.platform }}
validateDeployScript: .github/scripts/validate-deploy.sh
testStagesDir: ./terraform/${{ matrix.stage }}
env:
TF_VAR_ibmcloud_api_key: ${{ secrets.IBMCLOUD_API_KEY }}
TF_VAR_login_password: ${{ secrets.IBMCLOUD_API_KEY }}
TF_VAR_registry_password: ${{ secrets.IBMCLOUD_API_KEY }}
IBMCLOUD_API_KEY: ${{ secrets.IBMCLOUD_API_KEY }}
- name: Verify destroy of ${{ matrix.stage }} on ${{ matrix.platform }}
uses: cloud-native-toolkit/action-module-verify-destroy@main
if: ${{ always() }}
with:
clusterId: ${{ matrix.platform }}
testStagesDir: ./terraform/${{ matrix.stage }}
env:
TF_VAR_ibmcloud_api_key: ${{ secrets.IBMCLOUD_API_KEY }}
TF_VAR_login_password: ${{ secrets.IBMCLOUD_API_KEY }}
TF_VAR_registry_password: ${{ secrets.IBMCLOUD_API_KEY }}
IBMCLOUD_API_KEY: ${{ secrets.IBMCLOUD_API_KEY }}
label:
# The type of runner that the job will run on
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.TOKEN }}"