diff --git a/.gitea/workflows/ci-test.yaml b/.gitea/workflows/ci-test.yaml index edbd057..f118059 100644 --- a/.gitea/workflows/ci-test.yaml +++ b/.gitea/workflows/ci-test.yaml @@ -28,13 +28,22 @@ jobs: token: ${{ secrets.GGITEA_TOKEN }} path: infra/secrets + - name: Init OpenTofu + working-directory: infra + run: | + # Find all .auto.tfvars in the secrets folder + VAR_FILES="" + for f in secrets/*.auto.tfvars; do + VAR_FILES="$VAR_FILES -var-file=$f" + done + - name: Init OpenTofu working-directory: infra run: tofu init - name: Plan working-directory: infra - run: tofu plan -out=tfplan + run: tofu plan -chdir=iac $VAR_FILES -out=tfplan - name: Export tfplan working-directory: infra @@ -46,4 +55,4 @@ jobs: - name: Apply working-directory: infra - run: tofu apply -auto-approve tfplan \ No newline at end of file + run: tofu apply -chdir=iac $VAR_FILES -auto-approve tfplan \ No newline at end of file