Skip to content

Commit bc59466

Browse files
bluelindenKeavon
authored andcommitted
Make sure the workflow doesn't fail if the triggering comment was deleted.
1 parent 2afd4f1 commit bc59466

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/comment-!build-commands.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,20 @@ jobs:
101101
comment_id: ${{ github.event.comment.id }},
102102
owner: context.repo.owner,
103103
repo: context.repo.repo,
104-
body: '!build ([build link](https://github.com/GraphiteEditor/Graphite/actions/runs' + context.runId + '))'
104+
body: '!build ([build link](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + '))'
105+
});
106+
107+
- name: ❗ Post fallback comment if OG deleted
108+
if: ${{ failure() }}
109+
uses: actions/github-script@v6
110+
with:
111+
script: |
112+
github.rest.issues.createComment({
113+
issue_number: context.issue.number,
114+
owner: context.repo.owner,
115+
repo: context.repo.repo,
116+
body: 'A build was requested, [building...](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + ')'
105117
});
106-
107118
108119
- name: 🌐 Build Graphite web code
109120
env:

0 commit comments

Comments
 (0)