chore(workflows): Add link to merged PR

This commit is contained in:
Peter 2026-02-19 10:01:25 +01:00
parent b095cdd0e7
commit 01558e1437
Signed by: Peter
SSH key fingerprint: SHA256:B5tYaxBExaDm74r1px9iVeZ6F/ZDiyiy9SbBqfZYrvg
2 changed files with 22 additions and 2 deletions

View file

@ -22,7 +22,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_proxmox_endpoint: ${{ secrets.PROXMOX_ENDPOINT }}
TF_VAR_proxmox_api_token: ${{ secrets.PROXMOX_API_TOKEN }}
PR_NUMBER: ${{ forge.event.pull_request.number }}
steps:
- uses: https://github.com/actions/checkout@v4
- uses: https://github.com/opentofu/setup-opentofu@v1
@ -56,10 +55,21 @@ jobs:
run: tofu apply -auto-approve -no-color
continue-on-error: true
- name: Get merged PR
id: pr
run: |
pr_number=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ forge.api_url }}/repos/${{ forge.repository }}/commits/${{ forge.sha }}/pull" \
| jq -r '.number // empty')
echo "${pr_number}"
- name: Add comment
id: comment
if: always()
env:
PR_NUMBER: ${{ steps.pr.outputs.stdout }}
COMMENT_BODY: |
### ${{forge.workflow}}
#### ${{ steps.fmt.outcome == 'success' && '✅' || '❌' }} OpenTofu Format and Style 🖌

View file

@ -22,7 +22,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_proxmox_endpoint: ${{ secrets.PROXMOX_ENDPOINT }}
TF_VAR_proxmox_api_token: ${{ secrets.PROXMOX_API_TOKEN }}
PR_NUMBER: ${{ forge.event.pull_request.number }}
steps:
- uses: https://github.com/actions/checkout@v4
- uses: https://github.com/opentofu/setup-opentofu@v1
@ -56,10 +55,21 @@ jobs:
run: tofu apply -auto-approve -no-color
continue-on-error: true
- name: Get merged PR
id: pr
run: |
pr_number=$(curl -s \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
"${{ forge.api_url }}/repos/${{ forge.repository }}/commits/${{ forge.sha }}/pull" \
| jq -r '.number // empty')
echo "${pr_number}"
- name: Add comment
id: comment
if: always()
env:
PR_NUMBER: ${{ steps.pr.outputs.stdout }}
COMMENT_BODY: |
### ${{forge.workflow}}
#### ${{ steps.fmt.outcome == 'success' && '✅' || '❌' }} OpenTofu Format and Style 🖌