Skip to content

Commit 67e82e5

Browse files
committed
Refactored payload handling in GitHub Actions workflow to write payload to a temporary file, improving clarity and consistency in webhook calls for both master and non-master branches.
1 parent 3487008 commit 67e82e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/docs-to-vector.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ jobs:
2121
current_commit_id: $current_commit_id,
2222
repo_name: $repo_name,
2323
}')
24-
echo "PAYLOAD=$payload" >> $GITHUB_OUTPUT
24+
25+
echo "$payload" > /tmp/payload.json
2526
2627
2728
- name: Call Webhook (Master)
2829
if: ${{ github.ref_name == 'master' }}
2930
run: |
30-
payload=${{ steps.payload.outputs.PAYLOAD }}
31+
payload=$(cat /tmp/payload.json)
3132
sig=$(printf '%s' "$payload" | \
3233
openssl dgst -sha256 -hmac "${{ secrets.VECTOR_WEBHOOK_SECRET }}" -binary | xxd -p -c 256)
3334
@@ -48,7 +49,7 @@ jobs:
4849
- name: Call Webhook (Preview)
4950
if: ${{ github.ref_name != 'master' }}
5051
run: |
51-
payload=${{ steps.payload.outputs.PAYLOAD }}
52+
payload=$(cat /tmp/payload.json)
5253
sig=$(printf '%s' "$payload" | \
5354
openssl dgst -sha256 -hmac "${{ secrets.VECTOR_WEBHOOK_SECRET_PREVIEW }}" -binary | xxd -p -c 256)
5455

0 commit comments

Comments
 (0)