Skip to content

Commit ddd36c4

Browse files
alexeldeibDirectXMan12
authored andcommitted
fail via bash?
1 parent 9f59fe0 commit ddd36c4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/main.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
on: pull_request
1+
on:
2+
pull_request:
3+
types: [opened, closed, reopened, edited, synchronize]
24

35
jobs:
46
pr_checks:

hack/release/verify-emoji.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ base_link=$(jq -r '.pull_request.url' < ${GITHUB_EVENT_PATH})
2525
head_commit=$(curl -H "Authorization: Bearer ${GITHUB_TOKEN}" -H 'Accept: application/vnd.github.antiope-preview+json' -q ${base_link} | jq -r '.head.sha')
2626
echo "head commit is ${head_commit}"
2727

28-
curl --fail https://api.github.com/repos/${GITHUB_REPOSITORY}/check-runs -XPOST -H "Authorization: Bearer ${GITHUB_TOKEN}" -H 'Accept: application/vnd.github.antiope-preview+json' -H 'Content-Type: application/json' -q --data-raw '{"name": "Verify Emoji", "head_sha": "'${head_commit}'", "conclusion": "'${conclusion}'", "status": "completed", "completed_at": "'$(date -Iseconds)'", "output": {"title": "Verify Emoji", "summary": "'"${summary}"'"}}'
28+
echo ${summary}
29+
30+
if [[ ${conclusion} == "failure" ]]; then
31+
exit 1
32+
else
33+
exit 0
34+
fi

0 commit comments

Comments
 (0)