diff --git a/.gitea/workflows/auto-pr-tofu-plan.yml b/.gitea/workflows/auto-pr-tofu-plan.yml index f521086..e5c1fec 100644 --- a/.gitea/workflows/auto-pr-tofu-plan.yml +++ b/.gitea/workflows/auto-pr-tofu-plan.yml @@ -121,12 +121,14 @@ jobs: chdir: cloudflare out: cloudflare.tfplan - - name: Post PR comment - uses: borchero/terraform-plan-comment@v2.4.1 + - name: PR Comment + uses: alexnorell/tofu-pr-commenter@v1 + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITEA_TOKEN }} with: - token: ${{ secrets.BOT_GITEA_TOKEN }} - planfile: cloudflare.tfplan - terraform-cmd: tofu + commenter_type: plan + commenter_input: ${{ steps.tofu_plan.outputs.plan-output }} + commenter_exitcode: ${{ steps.step_id.outputs.exitcode }} - name: Wait for manual approval uses: trstringer/manual-approval@v1 @@ -161,32 +163,32 @@ jobs: # ${{ steps.tofu_plan.outputs.plan-output }} # Exit Code: ${{ steps.tofu_plan.outputs.exitcode }} - 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 + # 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: 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: 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 \ No newline at end of file + # - name: Run Tofu Apply + # uses: dnogu/tofu-apply@v1 + # with: + # working-directory: . + # chdir: cloudflare + # plan: cloudflare.tfplan \ No newline at end of file