-
Notifications
You must be signed in to change notification settings - Fork 56
79 lines (79 loc) · 2.48 KB
/
pull-request.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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: pull_request
on:
pull_request:
branches:
- master
jobs:
from_scratch:
runs-on: ubuntu-18.04
strategy:
matrix:
flavor:
- k3s-docker
steps:
- uses: actions/checkout@v2
- name: Deploy cluster
uses: docker://hashicorp/terraform:0.13.5
with:
entrypoint: scripts/gh-deploy-cluster.sh
args: ${{ matrix.flavor }} ${{ github.actor }} ${{ github.head_ref }}
- name: Wait for App of Apps
uses: docker://argoproj/argocd:v1.7.10
with:
entrypoint: scripts/gh-wait-for-app-of-apps.sh
args: ${{ matrix.flavor }}
- name: Destroy cluster
uses: docker://hashicorp/terraform:0.13.5
with:
entrypoint: scripts/gh-destroy-cluster.sh
args: ${{ matrix.flavor }}
update:
runs-on: ubuntu-18.04
strategy:
matrix:
flavor:
- k3s-docker
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.base_ref }}
- name: Deploy cluster with base_ref code
uses: docker://hashicorp/terraform:0.13.5
with:
entrypoint: scripts/gh-deploy-cluster.sh
args: ${{ matrix.flavor }} camptocamp ${{ github.base_ref }}
- name: Wait for App of Apps
uses: docker://argoproj/argocd:v1.7.10
with:
entrypoint: scripts/gh-wait-for-app-of-apps.sh
args: ${{ matrix.flavor }}
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
clean: false
- name: Dry-run on ref
uses: docker://hashicorp/terraform:0.13.5
with:
entrypoint: scripts/gh-plan.sh
args: ${{ matrix.flavor }} ${{ github.actor }} ${{ github.head_ref }}
- name: App-diff on ref
uses: docker://argoproj/argocd:v1.7.10
with:
entrypoint: scripts/gh-app-diff.sh
args: ${{ matrix.flavor }}
- name: Update cluster
uses: docker://hashicorp/terraform:0.13.5
with:
entrypoint: scripts/gh-deploy-cluster.sh
args: ${{ matrix.flavor }} ${{ github.actor }} ${{ github.head_ref }}
- name: Wait for App of Apps
uses: docker://argoproj/argocd:v1.7.10
with:
entrypoint: scripts/gh-wait-for-app-of-apps.sh
args: ${{ matrix.flavor }}
- name: Destroy cluster
uses: docker://hashicorp/terraform:0.13.5
with:
entrypoint: scripts/gh-destroy-cluster.sh
args: ${{ matrix.flavor }}