Skip to content

Commit c857ede

Browse files
committed
πŸƒβ€β™‚οΈ use new github action syntax
1 parent efbeb27 commit c857ede

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

β€Ž.github/main.workflow

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
workflow "PR Checks" {
2-
on = "pull_request"
3-
resolves = ["verify-emoji"]
4-
}
5-
6-
action "verify-emoji" {
7-
uses = "./hack/release"
8-
secrets = ["GITHUB_TOKEN"]
9-
}
1+
workflow "PR Checks" {
2+
on = "pull_request"
3+
resolves = ["verify-emoji"]
4+
}
5+
6+
action "verify-emoji" {
7+
uses = "./hack/release"
8+
secrets = ["GITHUB_TOKEN"]
9+
}

β€Ž.github/workflows/main.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: pull_request
2+
3+
jobs:
4+
pr_checks:
5+
runs-on: ubuntu-latest
6+
name: verify emoji
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: verify
10+
uses: ./hack/release
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

β€Žhack/release/verify-emoji.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ echo "head commit is ${head_commit}"
2727

2828
curl 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}"'"}}'
2929

30+
if [[ ${conclusion} == "failure" ]]; then
31+
exit 1
32+
else
33+
exit 0
34+
fi

0 commit comments

Comments
Β (0)