Initial version of Auto PR Tofu Plan.
Auto-PR Check/Creation and TF/OpenTofu Plan / Check and Create PR (push) Successful in 2m58s
Auto-PR Check/Creation and TF/OpenTofu Plan / Terraform/OpenTofu Plan (push) Failing after 2s

This commit is contained in:
2025-10-17 20:32:20 -04:00
parent d9994c8a5a
commit 70ccabb2ab
+96
View File
@@ -0,0 +1,96 @@
name: Auto-PR Check/Creation and TF/OpenTofu Plan
on:
workflow_dispatch:
push:
branches-ignore:
- "main"
- "renovate/**"
env:
OPENTOFU_VERSION: "1.10.6"
jobs:
check-and-create-pr:
name: Check and Create PR
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 1
- name: Gotify Notification
uses: eikendev/gotify-action@master
with:
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
notification_title: "GITEA: PR Check @ Rinoa"
notification_message: "Checking for existing PR... 🔍"
- name: PR Check/Creation
uses: https://git.trez.wtf/Trez/gitea-auto-pr@main
with:
url: ${{ secrets.TREZ_GITEA_URL }}
token: ${{ secrets.BOT_GITEA_TOKEN }}
pr-label: docker-compose,manual
assignee: ${{ github.actor }}
- name: Gotify Notification
uses: eikendev/gotify-action@master
with:
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
notification_title: "GITEA: PR Check @ Rinoa"
notification_message: "PR Check done 🎟️"
plan:
name: Terraform/OpenTofu Plan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup OpenTofu / Terraform
uses: opentofu/setup-tofu@v1
with:
version: ${{ env.OPENTOFU_VERSION }}
tofu_wrapper: true
- name: Tofu Plan
id: tofu_plan
uses: dnogu/tofu-plan@v1
with:
working-directory: .
chdir: cloudflare
# destroy:
# refresh-only:
# refresh:
# replace:
# target:
# target-file:
# exclude:
# exclude-file:
# var:
# var-file:
# out:
# compact-warnings:
# detailed-exitcode:
generate-config-out: .
input: true
# json:
# lock:
# lock-timeout:
# no-color:
# concise:
# parallelism:
# state:
# show-sensitive:
# display-plan:
- name: Tofu Plan Comment
id: tofu_plan
uses: alexnorell/tofu-pr-commenter@v2.0.0
with:
commenter_type: plan
commenter_input: ${{ steps.tofu_plan.outputs.plan-output }}
commenter_exitcode: ${{ steps.tofu_plan.outputs.exitcode }}