tofu plan, tofu output json capture and export test part III

This commit is contained in:
Mike Holloway 2025-01-07 04:55:08 -05:00
parent 382ef9743e
commit 3b9d996c50

View File

@ -4,6 +4,9 @@ on:
push:
tags:
- 'linode-test'
defaults:
run:
working-directory: "${{ gitea.workspace }}/.gitea/tofu"
jobs:
Explore-terraform-molecule-Gitea-Action:
@ -16,14 +19,12 @@ jobs:
- uses: opentofu/setup-opentofu@v1
- name: tofu apply
run: "tofu init && tofu apply -auto-approve"
working-directory: "${{ gitea.workspace }}/.gitea/tofu"
- name: tofu output capture
run: |
tofu output -json | jq -r '@sh "export TARGET_IP_ADDRESS=\(.act_worker_ip_address.value\)"'
echo $TARGET_IP_ADDRESS
sleep 300
working-directory: "${{ gitea.workspace }}/.gitea/tofu"
- name: tofu destroy
run: "tofu destroy -auto-approve""
working-directory: "${{ gitea.workspace }}/.gitea/tofu"