fix: move workflow to repo root, add working-directory for terraform
All checks were successful
Terraform / terraform (push) Successful in 13s

This commit is contained in:
Prox
2026-02-15 18:41:52 +02:00
parent 4749e6a672
commit b68cc22b38

View File

@@ -9,6 +9,10 @@ on:
env: env:
TF_VAR_netbird_token: ${{ secrets.NETBIRD_TOKEN }} TF_VAR_netbird_token: ${{ secrets.NETBIRD_TOKEN }}
defaults:
run:
working-directory: terraform
jobs: jobs:
terraform: terraform:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -41,10 +45,11 @@ jobs:
- name: Commit state changes - name: Commit state changes
if: github.ref == 'refs/heads/main' && github.event_name == 'push' if: github.ref == 'refs/heads/main' && github.event_name == 'push'
working-directory: .
run: | run: |
git config user.name "Terraform CI" git config user.name "Terraform CI"
git config user.email "ci@localhost" git config user.email "ci@localhost"
git add terraform.tfstate terraform.tfstate.backup 2>/dev/null || true git add terraform/terraform.tfstate terraform/terraform.tfstate.backup 2>/dev/null || true
if ! git diff --staged --quiet; then if ! git diff --staged --quiet; then
git commit -m "chore: update terraform state [skip ci]" git commit -m "chore: update terraform state [skip ci]"
git push git push