chore: Add tofu workflows #1

Merged
Peter merged 82 commits from pgi-add-workflows into main 2026-02-18 22:55:53 +01:00
Showing only changes of commit 8098efc5d4 - Show all commits

View file

@ -63,12 +63,7 @@ jobs:
comment_id=$(echo "$response" | jq -r \ comment_id=$(echo "$response" | jq -r \
'.[] | select(.body | test("OpenTofu Format and Style")) | .id' | head -n 1) '.[] | select(.body | test("OpenTofu Format and Style")) | .id' | head -n 1)
echo "::set-output name=comment_id::$comment_id" echo "comment_id=$comment_id"
- name: Set variables
id: vars
run: |
echo "COMMENT_ID=${{ steps.fetch.outputs.comment_id }}" >> $FORGEJO_ENV
- name: Upsert comment - name: Upsert comment
id: comment id: comment
@ -95,11 +90,11 @@ jobs:
</details> </details>
run: | run: |
if [ -n "$COMMENT_ID" ] && [ "$COMMENT_ID" != "null" ]; then if [ -n "${{ steps.fetch.outputs.comment_id }}" ] && [ "${{ steps.fetch.outputs.comment_id }}" != "null" ]; then
curl -s -X PATCH \ curl -s -X PATCH \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \ -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"${{ forge.server_url }}/api/v1/repos/${{ forge.repository }}/issues/comments/$COMMENT_ID" \ "${{ forge.server_url }}/api/v1/repos/${{ forge.repository }}/issues/comments/${{ steps.fetch.outputs.comment_id }}" \
-d "{\"body\":\"$COMMENT_BODY\"}" -d "{\"body\":\"$COMMENT_BODY\"}"
else else
curl -s -X POST \ curl -s -X POST \