-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 2.14 KB
/
cd.yaml
File metadata and controls
66 lines (55 loc) · 2.14 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: cd-dev-1
on:
push:
branches:
- main-disabled
paths:
- 'infrastructure/env/dev-1.properties'
pull_request:
branches:
- main-disabled
paths:
- 'infrastructure/env/dev-1.properties'
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
jobs:
pulumi:
name: Pulumi
runs-on: ubuntu-latest
steps:
# Turnstyle is used to prevent multiple push jobs from running at the same time.
- name: Turnstyle
if: ${{ github.event_name == 'push' }}
uses: softprops/turnstyle@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.14.x
- run: go mod download
working-directory: ${{ env.PULUMI_WORKING_DIRECTORY }}
- name: PR previews
if: ${{ github.event_name == 'pull_request' }}
uses: pulumi/actions@v6
with:
command: preview
stack-name: ${{ env.PULUMI_STACK_NAME }}
work-dir: ${{ env.PULUMI_WORKING_DIRECTORY }}
- name: Apply infrastructure update
if: ${{ github.event_name == 'push' }}
uses: pulumi/actions@v6
with:
command: up
stack-name: ${{ env.PULUMI_STACK_NAME }}
work-dir: ${{ env.PULUMI_WORKING_DIRECTORY }}
# If you'd like to run your Pulumi application outside of the official GitHub Action
#- name: Install Pulumi CLI
# uses: pulumi/setup-pulumi@v2
#- name: PR previews
# run: pulumi preview -s $PULUMI_STACK_NAME --cwd $PULUMI_WORKING_DIRECTORY
# if: ${{ github.event_name == 'pull_request' }}
#- name: Apply infrastructure update
# run: pulumi update --yes -s $PULUMI_STACK_NAME --cwd $PULUMI_WORKING_DIRECTORY
# if: ${{ github.event_name == 'push' }}