From eb3a6a18301d20a4ad8928fc7de4e62bfc639a50 Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Mon, 2 Nov 2026 10:11:54 -0500 Subject: [PATCH 1/2] ci: allow workspace checks by hand A workflow is a set of jobs GitHub runs on the code. The workspace workflow cannot be started by hand, so checking the code without a code change is hard. Add workflow_dispatch, the manual run button, so a maintainer can start the workspace checks when needed. Fixes #24 --- .github/workflows/workspace.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 6a7f6e5..1914a94 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -5,6 +5,7 @@ on: push: branches: [main] pull_request: + workflow_dispatch: # A newer update to the same pull request stops the older run. # Every other run, such as a push to main, gets its own group so it is From 67efdd4355ebcced219506fbb71f1fa7089c7c7a Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Mon, 2 Nov 2026 10:15:45 -0500 Subject: [PATCH 2/2] ci: share workspace and docs run rules A workflow is a set of jobs GitHub runs on the code. The workspace and docs workflows use different run rules, and docs can cancel a run on main, the main branch. Cancel means stop a run. Use the same rules pichi-vm/pichi uses. pichi is a related project in the same organization. A concurrency group is a label GitHub uses to limit runs that share it. Include the workflow name to keep workspace and docs in separate groups. Give each main run its own group and disable cancellation so another run cannot stop it or replace it while it waits. For other runs, group by pull request number or ref. A pull request is a proposed code change; a ref is the branch name GitHub provides. A newer run cancels an older run in the same group. Fixes #24 --- .github/workflows/docs.yml | 7 +++++-- .github/workflows/workspace.yml | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a7c71d0..4774132 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,9 +11,12 @@ env: permissions: contents: read +# A newer push to the same pull request or branch cancels the older run. +# Each run on main gets its own group, so runs on main are never +# cancelled or dropped while waiting. concurrency: - group: docs-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 1914a94..2d0b89d 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -7,12 +7,12 @@ on: pull_request: workflow_dispatch: -# A newer update to the same pull request stops the older run. -# Every other run, such as a push to main, gets its own group so it is -# never stopped. +# A newer push to the same pull request or branch cancels the older run. +# Each run on main gets its own group, so runs on main are never +# cancelled or dropped while waiting. concurrency: - group: ci-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} permissions: contents: read