-
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (70 loc) · 2.79 KB
/
ops-dns-plan.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
# Copyright (c) 2022 Geoffrey Huntley <ghuntley@ghuntley.com>. All rights reserved.
# SPDX-License-Identifier: Proprietary
name: "//ops/dns: terraform plan"
on:
push:
branches:
- '!trunk'
paths:
- 'ops/dns/**'
pull_request:
workflow_dispatch:
# Cancel in-progress runs for pull requests when developers push
# additional changes
concurrency:
group: ${{ github.workflow }}-ops-dns-plan-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
issues: write
pull-requests: write
jobs:
ops-dns-plan:
runs-on: namespace-profile-cached-amd64
steps:
- uses: namespacelabs/nscloud-checkout-action@v2
- name: Set up Nix cache
run: |
sudo mkdir -p /cache/nix /nix
sudo mount --bind /cache/nix /nix
sudo chown runner /nix
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
system-features = kvm nixos-test
- uses: JRMurr/direnv-nix-action@v3
with:
install-nix: "false"
cache-store: "false"
- name: deploy-dns plan
id: deploy-dns
run: direnv exec . deploy-dns plan
env:
GOOGLE_CREDENTIALS: ${{ secrets.TFSTATE_GOOGLE_CREDENTIALS }}
TF_VAR_cloudflare_email: ${{ secrets.TF_VAR_cloudflare_email }}
TF_VAR_cloudflare_api_key: ${{ secrets.TF_VAR_cloudflare_api_key }}
TF_VAR_com_ghuntley_cloudflare_zone_id: ${{ secrets.TF_VAR_com_ghuntley_cloudflare_zone_id }}
TF_VAR_dev_ghuntley_cloudflare_zone_id: ${{ secrets.TF_VAR_dev_ghuntley_cloudflare_zone_id }}
TF_VAR_net_ghuntley_cloudflare_zone_id: ${{ secrets.TF_VAR_net_ghuntley_cloudflare_zone_id }}
TF_VAR_com_ghuntley_ipv4: ${{ secrets.TF_VAR_com_ghuntley_ipv4 }}
TF_VAR_com_ghuntley_ipv6: ${{ secrets.TF_VAR_com_ghuntley_ipv6 }}
TF_VAR_dev_ghuntley_ipv4: ${{ secrets.TF_VAR_dev_ghuntley_ipv4 }}
TF_VAR_dev_ghuntley_ipv6: ${{ secrets.TF_VAR_dev_ghuntley_ipv6 }}
TF_VAR_net_ghuntley_ipv4: ${{ secrets.TF_VAR_net_ghuntley_ipv4 }}
TF_VAR_net_ghuntley_ipv6: ${{ secrets.TF_VAR_net_ghuntley_ipv6 }}
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Build output
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Build output
${{ steps.build.outputs.build-log }}
edit-mode: replace