feat(ci): Add Terraform CI/CD pipeline #4
@@ -132,7 +132,7 @@ jobs:
|
|||||||
- name: Comment PR with Plan
|
- name: Comment PR with Plan
|
||||||
if: gitea.event_name == 'pull_request'
|
if: gitea.event_name == 'pull_request'
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
PLAN_OUTPUT=$(cat plan_output.txt | head -c 60000)
|
PLAN_OUTPUT=$(cat plan_output.txt | head -c 60000)
|
||||||
COMMENT_BODY=$(cat <<EOF
|
COMMENT_BODY=$(cat <<EOF
|
||||||
@@ -155,7 +155,7 @@ jobs:
|
|||||||
|
|
||||||
# Post comment via Gitea API
|
# Post comment via Gitea API
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GIT_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "$(jq -n --arg body "$COMMENT_BODY" '{body: $body}')" \
|
-d "$(jq -n --arg body "$COMMENT_BODY" '{body: $body}')" \
|
||||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/${{ gitea.event.pull_request.number }}/comments"
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/${{ gitea.event.pull_request.number }}/comments"
|
||||||
|
|||||||
Reference in New Issue
Block a user