Skip to content

[TASK] Simplify ci.yml workflow dispatcher#707

Open
ohader wants to merge 2 commits intoTYPO3:mainfrom
ohader:actions
Open

[TASK] Simplify ci.yml workflow dispatcher#707
ohader wants to merge 2 commits intoTYPO3:mainfrom
ohader:actions

Conversation

@ohader
Copy link
Member

@ohader ohader commented Mar 4, 2026

  • omits having to use GH_TOKEN environment
  • omits having to invoke the gh CLI

- omits having to use GH_TOKEN environment
- omits having to invoke the `gh` CLI
@ohader
Copy link
Member Author

ohader commented Mar 4, 2026

ℹ️ Please back-port to other relevant branches as well

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the nightly dispatcher workflows by switching from gh workflow run ... (and GH_TOKEN) to invoking the existing CI workflow as a reusable workflow.

Changes:

  • Refactors nightly-main.yml and nightly-8.yml to call ./.github/workflows/ci.yml directly via uses:.
  • Makes ci.yml reusable by adding workflow_call + an optional ref input.
  • Updates the CI checkout step to use the provided ref input.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/nightly-main.yml Switches nightly main dispatch to a reusable workflow call.
.github/workflows/nightly-8.yml Switches nightly 8 dispatch to a reusable workflow call with ref: '8'.
.github/workflows/ci.yml Adds workflow_call support and uses a ref input for checkout.
Comments suppressed due to low confidence (1)

.github/workflows/nightly-main.yml:12

  • nightly-main previously always ran CI against the main branch (explicit checkout + --ref main). Now the reusable workflow is invoked without ref, so a manual run from another branch would test that branch instead of main. If the intent is to always validate main, pass with: ref: 'main' (or hardcode the checkout ref in ci.yml when called from this workflow).
        name: "dispatch-nightly-main"
        uses: ./.github/workflows/ci.yml


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +27 to +30
- name: Checkout ${{ inputs.ref || '' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.head_ref || '' }}
ref: ${{ inputs.ref || '' }}
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inputs.ref is referenced unconditionally, but the inputs context is only populated for workflow_call / workflow_dispatch runs. Since this workflow still runs on push and pull_request, those events may fail at expression evaluation with an unrecognized context. Use github.event.inputs.ref (which safely resolves to empty when not present) or switch to a fallback like github.sha/github.ref without referencing inputs for non-call runs.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +13
uses: ./.github/workflows/ci.yml
with:
ref: '8'
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behavior change vs the previous gh workflow run ci.yml --ref 8: this now runs the current branch's ci.yml definition (via local uses: ./.github/workflows/ci.yml) while checking out code from ref: '8'. If branch 8 expects a different CI workflow version, this will no longer match; consider calling a workflow from 8 (e.g., using uses: owner/repo/.github/workflows/ci.yml@8) or explicitly confirming that CI should be driven from main for the 8 branch.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Why was the 8 branch test triggered from main before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants