-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (77 loc) · 2.03 KB
/
pulumi.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
80
81
82
83
84
85
86
name: Pulumi
on:
workflow_dispatch:
schedule:
- cron: "45 5 * * *"
push:
branches:
- main
paths:
- .github/workflows/pulumi.yml
- deploy/**
- pkg/**
- Pulumi.*
- go.*
pull_request:
branches:
- main
jobs:
preview:
name: Preview
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main' || github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
stack:
- foundation
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Download dependencies
run: go mod download
- name: Preview infrastructure
uses: pulumi/actions@v5
with:
refresh: true
comment-on-pr: true
command: preview
stack-name: ${{ matrix.stack }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
update:
name: Update
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
strategy:
fail-fast: false
matrix:
stack:
- foundation
environment:
name: ${{ matrix.stack }}
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Download dependencies
run: go mod download
- name: Update infrastructure
uses: pulumi/actions@v5
with:
refresh: true
command: update
stack-name: ${{ matrix.stack }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}