Repository navigation
CI: Remove workflow_call trigger from packages_publishing & use GH CLI for call - #34811
Conversation
96b45ef to
a615098
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Packages publishing automation by removing the reusable workflow_call entry point from packages_publishing.yml and switching the scheduler to dispatch the publishing workflow via the GitHub CLI (gh workflow run) for each target branch.
Changes:
- Removed the
workflow_calltrigger from.github/workflows/packages_publishing.ymland simplified environment selection to stable vs daily environments. - Reworked
.github/workflows/packages_publishing_scheduler.ymlto dispatchpackages_publishing.ymlviagh workflow runinstead ofuses: ./.github/workflows/.... - Added a temporary
pull_requesttrigger to the scheduler workflow (flagged as risky for publishing workflows).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/packages_publishing.yml |
Removes reusable-workflow entry point and updates job environment selection logic. |
.github/workflows/packages_publishing_scheduler.yml |
Replaces reusable-workflow call with gh workflow run dispatch across release branches. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/packages_publishing_scheduler.yml:7
- The workflow is now configured to run on every pull request. For a publishing scheduler, this is likely unintended and can cause unnecessary/failed publish attempts on PRs (especially from forks with restricted tokens). Align this with the existing scheduler pattern (schedule + optional workflow_dispatch) instead of pull_request.
on:
schedule:
- cron: '00 18 * * *'
pull_request:
.github/workflows/packages_publishing_scheduler.yml:22
actions/checkoutis configured withsparse-checkout: README.mdbut does not disable cone mode. In this repo, the same pattern usessparse-checkout-cone-mode: false(see.github/workflows/codeql_scheduler.yml:19-25), otherwise the file pattern may not be applied as intended.
- name: Get sources
uses: actions/checkout@v6
with:
sparse-checkout: README.md
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/packages_publishing_scheduler.yml:22
actions/checkoutsparse checkout is configured to fetch a single file (README.md), butsparse-checkout-cone-modeis not set. In checkout’s default cone mode, file-only patterns likeREADME.mdcan fail; the repo already usessparse-checkout-cone-mode: falsefor this exact case in.github/workflows/codeql_scheduler.yml. Align this workflow to avoid sporadic checkout failures.
uses: actions/checkout@v6
with:
sparse-checkout: README.md
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.github/workflows/packages_publishing_scheduler.yml:12
- This job now dispatches another workflow via
gh workflow run, but the workflow no longer declares anypermissions:. If the repo’s defaultGITHUB_TOKENpermissions are set to read-only, the dispatch can fail because workflow dispatch typically requiresactions: write. Consider adding an explicitpermissions:block to make this independent of repository defaults.
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
.github/workflows/packages_publishing_scheduler.yml:25
gh workflow run ...only triggers the target workflow and exits without waiting; this scheduled workflow can report success even if the actual publishing run fails. Consider logging the triggered run URL/ID and (if desired) waiting on its completion so failures surface on the scheduled run.
- name: Publish Packages (${{ matrix.branch }})
run: |
gh workflow run packages_publishing.yml -f tag=daily --ref ${{ matrix.branch }}
This PR reverts:
After this change, the following logic applies:
dailyreleases can only be published from a protected branchstablereleases should be approved and can only be published from a protected branch