Skip to content

Commit 2c98b83

Browse files
committed
Fix notification in Github actions
This commit fixes the quotation symbols in event configuration in order to unblodk the workflow. Signed-off-by: Mark Kirichenko <[email protected]>
1 parent d6699f7 commit 2c98b83

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/event.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,30 @@ name: Notify owners about new event
33
on:
44
pull_request_target:
55
types: [opened, reopened]
6-
6+
77
issues:
88
types: [opened, reopened]
99

1010
jobs:
1111
build:
12-
if: ${{ github.repository == "aws/aws-nitro-enclaves-cli" }}
12+
if: github.repository == 'aws/aws-nitro-enclaves-cli'
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: if_pr
1616
if: github.event.pull_request
1717
run: |
18-
echo "EVENT_TYPE=PR" >> $GITHUB_ENV
19-
echo "EVENT_URL=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
18+
echo "EVENT_TYPE=PR" >> "$GITHUB_ENV"
19+
echo "EVENT_URL=${{ github.event.pull_request.html_url }}" >> "$GITHUB_ENV"
20+
2021
- name: if_issue
2122
if: github.event.issue
2223
run: |
23-
echo "EVENT_TYPE=issue" >> $GITHUB_ENV
24-
echo "EVENT_URL=${{ github.event.issue.html_url }}" >> $GITHUB_ENV
24+
echo "EVENT_TYPE=issue" >> "$GITHUB_ENV"
25+
echo "EVENT_URL=${{ github.event.issue.html_url }}" >> "$GITHUB_ENV"
26+
2527
- name: notify
2628
run: |
27-
curl -d '{ "type": "${{ env.EVENT_TYPE }}", "url": "${{ env.EVENT_URL }}" }' ${{ secrets.EVENT_WEBHOOK_URL }}
29+
curl -X POST \
30+
-H "Content-Type: application/json" \
31+
-d '{"type":"${{ env.EVENT_TYPE }}","url":"${{ env.EVENT_URL }}"}' \
32+
"${{ secrets.EVENT_WEBHOOK_URL }}"

0 commit comments

Comments
 (0)