Skip to content

Commit f8c2cee

Browse files
bluelindenKeavon
authored andcommitted
Post comment on build/upload failure
1 parent bc59466 commit f8c2cee

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@ jobs:
122122
run: |
123123
cd frontend
124124
mold -run npm run ${{ steps.build_command.outputs.command }}
125+
126+
- name: ❗ Warn on build failure
127+
if: ${{ failure() }}
128+
uses: actions/github-script@v6
129+
with:
130+
script: |
131+
github.rest.issues.createComment({
132+
issue_number: context.issue.number,
133+
owner: context.repo.owner,
134+
repo: context.repo.repo,
135+
body: 'The build process has failed. Please check the [build logs](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + ') for details.'
136+
});
125137
126138
- name: 📤 Publish to Cloudflare Pages
127139
id: cloudflare
@@ -134,6 +146,18 @@ jobs:
134146
projectName: graphite-dev
135147
directory: frontend/dist
136148

149+
- name: ❗ Warn on publish failure
150+
if: ${{ failure() }}
151+
uses: actions/github-script@v6
152+
with:
153+
script: |
154+
github.rest.issues.createComment({
155+
issue_number: context.issue.number,
156+
owner: context.repo.owner,
157+
repo: context.repo.repo,
158+
body: 'The deployment to Cloudflare Pages has failed. Please check the [build logs](https://github.com/GraphiteEditor/Graphite/actions/runs/' + context.runId + ') for details.
159+
});
160+
137161
- name: 💬 Comment build link
138162
uses: actions/github-script@v6
139163
with:

0 commit comments

Comments
 (0)