-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.38 KB
/
terraform.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
name: Terraform
on:
push:
branches: [ main ]
paths:
- 'layers/**'
- 'modules/**'
- '.vault-version'
- '.github/workflows/terraform.yml'
permissions: write-all
jobs:
terraform-layer-deploy:
uses: jtcressy-home/actions-workflows/.github/workflows/terraform.yml@main
with:
path: /layers/deploy/
environment: vault-deploy
tailscale: false
action: apply
debug: ${{ github.event.inputs.debug || false }}
secrets: inherit
vault-deploy-check:
runs-on: ubuntu-latest
needs:
- terraform-layer-deploy
outputs:
outcome: ${{ steps.check.outcome }}
steps:
- name: Check if Vault is healthy before proceeding with configuration
id: check
uses: gpuliyar/[email protected]
with:
url: https://vault.jtcressy.net/v1/sys/health
retry-count: 3
retry-delay: 1000
codes-allowed: 200
continue-on-error: true
terraform-layer-config:
uses: jtcressy-home/actions-workflows/.github/workflows/terraform.yml@main
if: needs.vault-deploy-check.outputs.outcome == 'success'
needs:
- terraform-layer-deploy
- vault-deploy-check
with:
path: /layers/config/
environment: vault-config
vault: https://vault.jtcressy.net
tailscale: false
action: apply
debug: ${{ github.event.inputs.debug || false }}
secrets: inherit