Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ on:
push:
pull_request:
workflow_dispatch:
workflow_call:
inputs:
ref:
required: false
type: string
default: ''

permissions:
contents: read

jobs:

Expand All @@ -15,10 +24,10 @@ jobs:
php: [ '8.2', '8.3', '8.4', '8.5' ]
steps:

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

- name: Composer install
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s composerUpdate
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/nightly-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ on:
jobs:
nightly-8:
name: "dispatch-nightly-8"
runs-on: ubuntu-22.04
permissions:
actions: write
steps:
- name: Checkout '8'
uses: actions/checkout@v4
with:
ref: '8'

- name: Execute 'ci.yml' on '8'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run ci.yml --ref 8
uses: ./.github/workflows/ci.yml
with:
ref: '8'
Comment on lines +11 to +13
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?

Copy link
Collaborator

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?

SHORT: GH only supports scheduled workflows on the main branch.

LONG:

GH does support scheduled actions only on the main branch and the only way I found was to dispatch the workflow for the 8 branch that whay, but that needs the permission.

To be correct - dispatch the workflow using the workflow definition from that branch and not from 8.

uses: owner/repo/.github/workflows/ci.yml@8

That may work but needs to be verified that it works using the ci.yaml from branch 8 and not main. I was not aware of that branch ref syntax.

17 changes: 3 additions & 14 deletions .github/workflows/nightly-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ on:
jobs:
nightly-main:
name: "dispatch-nightly-main"
runs-on: ubuntu-22.04
permissions:
actions: write
steps:
- name: Checkout 'main'
uses: actions/checkout@v4
with:
ref: 'main'

- name: Execute 'ci.yml' on 'main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run ci.yml --ref main
uses: ./.github/workflows/ci.yml
with:
ref: 'main'