diff --git a/.github/actions/pm-dispatch-ci-fix/action.yml b/.github/actions/pm-dispatch-ci-fix/action.yml index ee16b1e32f..8859ca2646 100644 --- a/.github/actions/pm-dispatch-ci-fix/action.yml +++ b/.github/actions/pm-dispatch-ci-fix/action.yml @@ -71,7 +71,7 @@ runs: steps: - name: Dispatch ci-fix via pm-dispatch-task id: dispatch - uses: developing-today/code/.github/actions/pm-dispatch-task@main + uses: ./.pm-central/.github/actions/pm-dispatch-task with: task: ci-fix repo: ${{ inputs.repo }} diff --git a/.github/actions/pm-dispatch-task/action.yml b/.github/actions/pm-dispatch-task/action.yml index ee906dbda1..f6d804056b 100644 --- a/.github/actions/pm-dispatch-task/action.yml +++ b/.github/actions/pm-dispatch-task/action.yml @@ -1,4 +1,11 @@ name: pm-dispatch-task +# LOADING CONTRACT (issue #4742): this action must be loaded from a +# workspace checkout of developing-today/code at .pm-central (as +# pm-scheduled.yml and main-broken.yml do). Its nested dispatch steps +# load pm-dispatch-start / pm-dispatch-queue from that same checkout +# via local paths, because the remote `...@main` form makes the runner +# download the whole repo as an action archive, which fails with +# `Could not find file .../_staging/code-/archive`. description: >- Task-level entry point for pm-dispatch: dispatch a named, recurring task (bolt, palette, suggestions, ci-fix, or any future library entry) through @@ -9,7 +16,7 @@ description: >- `permissions: id-token: write` — the starter/queuer steps mint a GitHub Actions OIDC token (audience pm-dispatch) to authenticate. For `task: ci-fix` the calling job MUST also provide a GH_TOKEN in the job - environment (for example `GH_TOKEN: ${{ github.token }}`) whose token can + environment (for example `GH_TOKEN` set to the workflow GITHUB_TOKEN) whose token can read issues in the target repo (for example `permissions: issues: read`), which the dedupe step uses to search for an existing open tracking issue. inputs: @@ -267,7 +274,7 @@ runs: - name: Dispatch via pm-dispatch-start (launch a session now) id: dispatch_start if: inputs.task != 'ci-fix' || (steps.dedupe.outputs.mode == 'fresh' && steps.resolve.outputs.is_default_branch == 'true') - uses: developing-today/code/.github/actions/pm-dispatch-start@main + uses: ./.pm-central/.github/actions/pm-dispatch-start with: repo: ${{ inputs.repo }} title: ${{ steps.resolve.outputs.title }} @@ -279,7 +286,7 @@ runs: - name: Dispatch via pm-dispatch-queue (attach to the existing tracking issue) id: dispatch_attach if: inputs.task == 'ci-fix' && steps.dedupe.outputs.mode == 'attach' - uses: developing-today/code/.github/actions/pm-dispatch-queue@main + uses: ./.pm-central/.github/actions/pm-dispatch-queue with: repo: ${{ inputs.repo }} issue_number: ${{ steps.dedupe.outputs.issue_number }} @@ -292,7 +299,7 @@ runs: - name: Dispatch via pm-dispatch-queue (queue with a new tracking issue) id: dispatch_queue if: inputs.task == 'ci-fix' && steps.dedupe.outputs.mode == 'fresh' && steps.resolve.outputs.is_default_branch != 'true' - uses: developing-today/code/.github/actions/pm-dispatch-queue@main + uses: ./.pm-central/.github/actions/pm-dispatch-queue with: repo: ${{ inputs.repo }} issue: "true" diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index 8dc89424d6..c23c6aec76 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -113,7 +113,17 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: developing-today/code/.github/actions/pm-dispatch-ci-fix@main + # pm-dispatch-task (reached via pm-dispatch-ci-fix) loads its + # nested starter/queuer from ./.pm-central in this workspace, so + # check the dispatch actions out first (issue #4742). + - name: Check out the pm-dispatch actions (central) + uses: actions/checkout@v7 + with: + repository: developing-today/code + ref: main + path: .pm-central + persist-credentials: false + - uses: ./.pm-central/.github/actions/pm-dispatch-ci-fix continue-on-error: true env: GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/pm-dispatch-smoke.yml b/.github/workflows/pm-dispatch-smoke.yml index 43ce0dd19f..bc645359b7 100644 --- a/.github/workflows/pm-dispatch-smoke.yml +++ b/.github/workflows/pm-dispatch-smoke.yml @@ -35,8 +35,18 @@ jobs: env: GH_TOKEN: ${{ github.token }} steps: + # pm-dispatch-task's nested steps load pm-dispatch-start / + # pm-dispatch-queue from ./.pm-central in the caller's workspace, + # so the central checkout must exist before dispatch (issue #4742). + - name: Check out the pm-dispatch actions (central) + uses: actions/checkout@v7 + with: + repository: developing-today/code + ref: main + path: .pm-central + persist-credentials: false - name: Dispatch ci-fix smoke via pm-dispatch-task - uses: developing-today/code/.github/actions/pm-dispatch-task@main + uses: ./.pm-central/.github/actions/pm-dispatch-task env: GH_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/pm-scheduled.yml b/.github/workflows/pm-scheduled.yml index bea87e8bbd..da809be396 100644 --- a/.github/workflows/pm-scheduled.yml +++ b/.github/workflows/pm-scheduled.yml @@ -52,6 +52,25 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: + # The pm-dispatch action family is loaded from this checkout + # rather than as `developing-today/code/.github/actions/...@main`. + # The remote form made the runner download the whole + # developing-today/code repo as an action archive, which fails + # with `Could not find file .../_staging/code-/archive` + # (issue #4742; same failure and fix as issue #4867 in + # main-broken.yml). A local action path is resolved from the + # workspace and needs no action-repository download. The + # checkout lands at .pm-central because pm-dispatch-task's own + # nested steps load pm-dispatch-start / pm-dispatch-queue from + # that same path (see that action's header note). + - name: Check out the pm-dispatch actions (central) + uses: actions/checkout@v7 + with: + repository: developing-today/code + ref: main + path: .pm-central + persist-credentials: false + - name: Resolve the target repo and the task list id: resolve shell: bash @@ -156,7 +175,7 @@ jobs: - name: Dispatch bolt id: bolt if: steps.resolve.outputs.has_bolt == 'true' - uses: developing-today/code/.github/actions/pm-dispatch-task@main + uses: ./.pm-central/.github/actions/pm-dispatch-task with: task: bolt repo: ${{ steps.resolve.outputs.repo }} @@ -164,7 +183,7 @@ jobs: - name: Dispatch palette id: palette if: steps.resolve.outputs.has_palette == 'true' - uses: developing-today/code/.github/actions/pm-dispatch-task@main + uses: ./.pm-central/.github/actions/pm-dispatch-task with: task: palette repo: ${{ steps.resolve.outputs.repo }} @@ -172,7 +191,7 @@ jobs: - name: Dispatch suggestions id: suggestions if: steps.resolve.outputs.has_suggestions == 'true' - uses: developing-today/code/.github/actions/pm-dispatch-task@main + uses: ./.pm-central/.github/actions/pm-dispatch-task with: task: suggestions repo: ${{ steps.resolve.outputs.repo }}