-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (53 loc) · 1.83 KB
/
tofu.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
44
45
46
47
48
49
50
51
52
53
name: tofu
on:
push:
branches:
- "main"
schedule:
- cron: "0 4 * * *"
concurrency:
group: ${{ github.workflow }}
jobs:
linode:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
- env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
PG_CONN_STR: ${{ secrets.PG_CONN_STR }}
TF_VAR_bitwarden_token: ${{ secrets.BITWARDEN_TOKEN }}
TF_VAR_github_token: ${{ secrets.PAT }}
run: |
tofu -chdir=./terraform/linode init -upgrade
- env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
PG_CONN_STR: ${{ secrets.PG_CONN_STR }}
run: |
tofu -chdir=./terraform/linode \
apply -auto-approve -input=false -lock=true -no-color \
-var=kubeconfig=lke.yaml
oci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: opentofu/setup-opentofu@v1
- env:
PG_CONN_STR: ${{ secrets.PG_CONN_STR }}
TF_VAR_fingerprint: ${{ secrets.OCI_FINGERPRINT }}
TF_VAR_private_key: ${{ secrets.OCI_PEM_PRV }}
TF_VAR_ssh_public_keys: ${{ secrets.SSH_PUB_KEY }}
TF_VAR_tenancy_ocid: ${{ secrets.OCI_TENANCY_OCID }}
TF_VAR_user_ocid: ${{ secrets.OCI_USER_OCID }}
run: |
tofu -chdir=./terraform/oci init -upgrade
- env:
PG_CONN_STR: ${{ secrets.PG_CONN_STR }}
TF_VAR_fingerprint: ${{ secrets.OCI_FINGERPRINT }}
TF_VAR_private_key: ${{ secrets.OCI_PEM_PRV }}
TF_VAR_ssh_public_keys: ${{ secrets.SSH_PUB_KEY }}
TF_VAR_tenancy_ocid: ${{ secrets.OCI_TENANCY_OCID }}
TF_VAR_user_ocid: ${{ secrets.OCI_USER_OCID }}
run: |
tofu -chdir=./terraform/oci \
apply -auto-approve -input=false -lock=true -no-color