Compare commits
2 commits
c6f53eb3d3
...
782113aa35
| Author | SHA1 | Date | |
|---|---|---|---|
| 782113aa35 | |||
| 7c5dc4c36c |
1 changed files with 9 additions and 2 deletions
|
|
@ -31,6 +31,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
tofu_version: 1.11.5
|
tofu_version: 1.11.5
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y jq
|
||||||
|
|
||||||
- name: OpenTofu Init
|
- name: OpenTofu Init
|
||||||
id: init
|
id: init
|
||||||
run: tofu init --upgrade
|
run: tofu init --upgrade
|
||||||
|
|
@ -61,10 +66,12 @@ jobs:
|
||||||
echo "::set-output name=comment_id::$comment_id"
|
echo "::set-output name=comment_id::$comment_id"
|
||||||
|
|
||||||
- name: Set variables
|
- name: Set variables
|
||||||
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
echo "COMMENT_ID=${{ steps.fetch.outputs.comment_id }}" >> $FORGEJO_ENV
|
echo "COMMENT_ID=${{ steps.fetch.outputs.comment_id }}" >> $FORGEJO_ENV
|
||||||
|
|
||||||
- name: Upsert comment
|
- name: Upsert comment
|
||||||
|
id: comment
|
||||||
env:
|
env:
|
||||||
COMMENT_BODY: |
|
COMMENT_BODY: |
|
||||||
`#### OpenTofu Format and Style 🖌\`${{ steps.fmt.outcome }}\`
|
`#### OpenTofu Format and Style 🖌\`${{ steps.fmt.outcome }}\`
|
||||||
|
|
@ -92,12 +99,12 @@ jobs:
|
||||||
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" \
|
||||||
"$FORGEJO_URL/api/v1/repos/${{ forge.repository }}/issues/comments/$COMMENT_ID" \
|
"${{ forge.server_url }}/api/v1/repos/${{ forge.repository }}/issues/comments/$COMMENT_ID" \
|
||||||
-d "{\"body\":\"$COMMENT_BODY\"}"
|
-d "{\"body\":\"$COMMENT_BODY\"}"
|
||||||
else
|
else
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"$FORGEJO_URL/api/v1/repos/${{ forge.repository }}/issues/$PR_NUMBER/comments" \
|
"${{ forge.server_url }}/api/v1/repos/${{ forge.repository }}/issues/$PR_NUMBER/comments" \
|
||||||
-d "{\"body\":\"$COMMENT_BODY\"}"
|
-d "{\"body\":\"$COMMENT_BODY\"}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue