Skip to content

Commit 6b49f2e

Browse files
committed
Ask autobuilds to build every revision that lands here
Nothing connected a commit on this branch to a build of it: the nightly moved when a person went and started one. Every push to the development branch now announces its exact revision to autobuilds, which decides whether it is worth building -- it deduplicates by build_id, so a revision it already built costs one job and no runners. The `run_build` listeners this repository carried were the same idea from the other direction and no sender ever existed. Keeping them while the name means "autobuilds, build this" would leave a dispatch able to start a full build here by accident.
1 parent c4c79e8 commit 6b49f2e

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Build
33
on:
44
push:
55
pull_request:
6-
repository_dispatch:
7-
types: [run_build]
86

97
# A push to a branch with an open pull request fires both triggers; one
108
# group per head commit keeps a single run of the pair alive.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Announce a revision to autobuilds
2+
3+
# Discovery starts here: every commit that lands on the development branch
4+
# is a new build input, and autobuilds is told about it. It deduplicates by
5+
# build_id, so announcing a revision it already built costs one job.
6+
on:
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
announce:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Ask autobuilds to build this revision
15+
env:
16+
GH_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
17+
shell: bash
18+
run: |
19+
if [[ -z "$GH_TOKEN" ]]; then
20+
echo "::error::REPO_DISPATCH_TOKEN secret is required for cross-repo dispatch to vitasdk/autobuilds"
21+
exit 1
22+
fi
23+
gh api repos/vitasdk/autobuilds/dispatches \
24+
-f event_type=run_build \
25+
-f client_payload[buildscripts_ref]="$GITHUB_SHA"

0 commit comments

Comments
 (0)