chore: Add tofu workflows #1
1 changed files with 19 additions and 19 deletions
|
|
@ -57,23 +57,23 @@ jobs:
|
||||||
run:
|
run:
|
||||||
echo "${{ toJSON(forge) }}"
|
echo "${{ toJSON(forge) }}"
|
||||||
|
|
||||||
# - name: Fetch existing comments
|
- name: Fetch existing comments
|
||||||
# id: fetch
|
id: fetch
|
||||||
# run: |
|
run: |
|
||||||
# response=$(curl -s \
|
response=$(curl -s \
|
||||||
# -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
|
||||||
# "${{ forge.server_url }}/api/v1/repos/${{ forge.repository }}/issues/$PR_NUMBER/comments")
|
"${{ forge.api_url }}/repos/${{ forge.repository }}/issues/$PR_NUMBER/comments")
|
||||||
#
|
|
||||||
# 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)
|
||||||
#
|
|
||||||
# if [ -z $comment_id ]; then
|
if [ -z $comment_id ]; then
|
||||||
# echo "Unable to fetch comment."
|
echo "Unable to fetch comment."
|
||||||
# exit 1
|
exit 1
|
||||||
# fi
|
fi
|
||||||
#
|
|
||||||
# echo "comment_id=$comment_id"
|
echo "comment_id=$comment_id"
|
||||||
#
|
|
||||||
# - name: Upsert comment
|
# - name: Upsert comment
|
||||||
# id: comment
|
# id: comment
|
||||||
# env:
|
# env:
|
||||||
|
|
@ -103,12 +103,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" \
|
||||||
# "${{ forge.server_url }}/api/v1/repos/${{ forge.repository }}/issues/comments/${{ steps.fetch.outputs.comment_id }}" \
|
# "${{ forge.api_url }}/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 \
|
||||||
# -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/$PR_NUMBER/comments" \
|
# "${{ forge.api_url }}/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