-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (36 loc) · 1.13 KB
/
hcloud-cost-mgmt.yaml
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
name: Hcloud Cost Mgmt
on:
workflow_dispatch: {}
schedule:
- cron: '0 23 * * *'
jobs:
cost-mgmt:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
project_id: hallowed-port-433217-t0
workload_identity_provider: projects/507949509448/locations/global/workloadIdentityPools/github/providers/world
export_environment_variables: 'true'
create_credentials_file: 'true'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- uses: DeterminateSystems/nix-installer-action@v16
with:
extra-conf: |
accept-flake-config = true
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Tofu Destroy
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
TAILSCALE_API_KEY: ${{ secrets.TAILSCALE_API_KEY }}
TF_VAR_kexec_tarball: "dummy"
run: |
cd tofu/dev
nix run .#tofuWithPlugins -- init
nix run .#tofuWithPlugins -- destroy -auto-approve