mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Update .gitea/workflows/ci-test.yaml
This commit is contained in:
@ -28,22 +28,19 @@ jobs:
|
|||||||
token: ${{ secrets.GGITEA_TOKEN }}
|
token: ${{ secrets.GGITEA_TOKEN }}
|
||||||
path: infra/secrets
|
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
|
- name: Init OpenTofu
|
||||||
working-directory: infra/iac
|
working-directory: infra/iac
|
||||||
run: tofu init
|
run: tofu init
|
||||||
|
|
||||||
- name: Plan
|
- name: Plan
|
||||||
working-directory: infra/iac
|
working-directory: infra/iac
|
||||||
run: tofu plan $VAR_FILES -out=tfplan
|
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
|
||||||
|
tofu plan $VAR_FILES -out=tfplan
|
||||||
|
|
||||||
- name: Export tfplan
|
- name: Export tfplan
|
||||||
working-directory: infra
|
working-directory: infra
|
||||||
@ -55,4 +52,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Apply
|
- name: Apply
|
||||||
working-directory: infra/iac
|
working-directory: infra/iac
|
||||||
run: tofu apply $VAR_FILES -auto-approve tfplan
|
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
|
||||||
|
tofu apply $VAR_FILES -auto-approve tfplan
|
||||||
Reference in New Issue
Block a user