-
Notifications
You must be signed in to change notification settings - Fork 12
41 lines (35 loc) · 964 Bytes
/
apply.yaml
File metadata and controls
41 lines (35 loc) · 964 Bytes
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
name: Apply configuration
on:
workflow_dispatch:
schedule:
- cron: "17 */4 * * *"
push:
paths:
- "**/*.tf"
- "**/*.csv"
branches:
- main
jobs:
apply:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_CLI_ARGS: "-no-color"
TF_IN_AUTOMATION: "true"
steps:
- uses: opentofu/setup-opentofu@v1
with:
tofu_wrapper: false
- uses: actions/checkout@v6
- run: ./ci/run-tofu-cmd.sh init
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.CONFIG_APP_ID }}
private-key: ${{ secrets.CONFIG_APP_SECRET }}
owner: ${{ github.repository_owner }}
- run: ./ci/run-tofu-cmd.sh apply -concise -auto-approve
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}