-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.43 KB
/
ci.yml
File metadata and controls
60 lines (49 loc) · 1.43 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
id-token: write
contents: read
jobs:
pulumi:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v22
- name: Nix cache
uses: DeterminateSystems/magic-nix-cache-action@v13
- name: Dprint check
if: github.event_name == 'pull_request'
run: nix develop -c dprint check
- name: Lint
if: github.event_name == 'pull_request'
run: nix develop -c make lint
- name: Pulumi login
uses: pulumi/auth-actions@v1
with:
organization: UnstoppableMango
requested-token-type: urn:pulumi:token-type:access_token:personal
scope: user:UnstoppableMango
- name: Set Pulumi flags
run: |
flags=""
if [ "${{ github.actor }}" = "renovate[bot]" ]; then
flags="$flags --expect-no-changes"
fi
echo "PULUMI_FLAGS=$flags" >> "$GITHUB_ENV"
- name: Preview
if: github.event_name == 'pull_request'
run: nix develop -c make preview
- name: Deploy
if: github.event_name == 'push'
env:
PULUMI_FLAGS: --yes ${{ env.PULUMI_FLAGS }}
run: nix develop -c make up