Adding approval and apply steps for testing.
Auto-PR Check/Creation and TF/OpenTofu Plan / Check and Create PR (push) Successful in 26s
Auto-PR Check/Creation and TF/OpenTofu Plan / OpenTofu Plan (push) Successful in 1m52s
Auto-PR Check/Creation and TF/OpenTofu Plan / Manual Approval (push) Failing after 12s
Auto-PR Check/Creation and TF/OpenTofu Plan / Apply Tofu Plan (push) Has been skipped
Auto-PR Check/Creation and TF/OpenTofu Plan / Check and Create PR (push) Successful in 26s
Auto-PR Check/Creation and TF/OpenTofu Plan / OpenTofu Plan (push) Successful in 1m52s
Auto-PR Check/Creation and TF/OpenTofu Plan / Manual Approval (push) Failing after 12s
Auto-PR Check/Creation and TF/OpenTofu Plan / Apply Tofu Plan (push) Has been skipped
This commit is contained in:
@@ -6,8 +6,8 @@ on:
|
|||||||
branches-ignore:
|
branches-ignore:
|
||||||
- "main"
|
- "main"
|
||||||
- "renovate/**"
|
- "renovate/**"
|
||||||
paths:
|
# paths:
|
||||||
- "cloudflare/**"
|
# - "cloudflare/**"
|
||||||
env:
|
env:
|
||||||
OPENTOFU_VERSION: "1.10.6"
|
OPENTOFU_VERSION: "1.10.6"
|
||||||
HC_VAULT_VERSION: "1.20.4"
|
HC_VAULT_VERSION: "1.20.4"
|
||||||
@@ -192,4 +192,43 @@ jobs:
|
|||||||
# with:
|
# with:
|
||||||
# commenter_type: plan
|
# commenter_type: plan
|
||||||
# commenter_input: ${{ steps.tofu_plan.outputs.plan-output }}
|
# commenter_input: ${{ steps.tofu_plan.outputs.plan-output }}
|
||||||
# commenter_exitcode: ${{ steps.tofu_plan.outputs.exitcode }}
|
# commenter_exitcode: ${{ steps.tofu_plan.outputs.exitcode }}
|
||||||
|
approval:
|
||||||
|
name: Manual Approval
|
||||||
|
needs: plan
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Wait for manual approval
|
||||||
|
uses: hmarr/auto-approve-action@v2
|
||||||
|
with:
|
||||||
|
message: "Awaiting manual approval to apply Tofu plan"
|
||||||
|
|
||||||
|
apply:
|
||||||
|
name: Apply Tofu Plan
|
||||||
|
needs: approval
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ needs.approval.result == 'success' }}
|
||||||
|
env:
|
||||||
|
VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup OpenTofu
|
||||||
|
uses: opentofu/setup-opentofu@v1.0.6
|
||||||
|
with:
|
||||||
|
version: ${{ env.OPENTOFU_VERSION }}
|
||||||
|
tofu_wrapper: true
|
||||||
|
|
||||||
|
- name: Export env from Vault
|
||||||
|
run: |
|
||||||
|
set -a
|
||||||
|
source cloudflare/.env
|
||||||
|
set +a
|
||||||
|
|
||||||
|
- name: Run Tofu Apply
|
||||||
|
uses: dnogu/tofu-apply@v1
|
||||||
|
with:
|
||||||
|
working-directory: .
|
||||||
|
chdir: cloudflare
|
||||||
|
plan: cloudflare.tfplan
|
||||||
Reference in New Issue
Block a user