Skip to content

Commit 370da1e

Browse files
masterpigaclaude
andcommitted
nightly: add workflow_dispatch branch input
Allows manually triggering the nightly build against any branch from the GitHub Actions UI or gh CLI, without editing the workflow file. Scheduled runs are unaffected (input is empty, falls back to github.ref_name). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cfe57f3 commit 370da1e

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
schedule:
55
- cron: "0 0 * * *"
66
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'Branch to build (leave empty to use the branch this workflow runs from)'
10+
required: false
11+
default: ''
712

813
permissions:
914
contents: read
@@ -18,8 +23,6 @@ jobs:
1823
fail-fast: false
1924
matrix:
2025
os: [ubuntu-22.04, ubuntu-24.04-arm]
21-
branch:
22-
- { code: master, label: gitmaster }
2326
include:
2427
- os: ubuntu-22.04
2528
compiler: { compiler: GNU12, CC: gcc-12, CXX: g++-12, packages: gcc-12 g++-12 }
@@ -34,8 +37,8 @@ jobs:
3437
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
3538
GENERATOR: ${{ matrix.generator }}
3639
TARGET: ${{ matrix.target }}
37-
BRANCH: ${{ matrix.branch.code }}
38-
BUILD_NAME: ${{ matrix.branch.label }}
40+
BRANCH: ${{ inputs.branch || github.ref_name }}
41+
BUILD_NAME: ${{ inputs.branch || github.ref_name }}
3942
steps:
4043
- name: Install compiler ${{ matrix.compiler.compiler }}
4144
run: |
@@ -159,7 +162,7 @@ jobs:
159162
run: |
160163
# Note that we can't make a shallow clone to reduce clone traffic and time, as we have to
161164
# fetch the entire history to correctly generate the version for the AppImage filename
162-
git clone -b ${{ github.ref_name }} https://github.com/${{ github.repository }} src
165+
git clone -b ${{ inputs.branch || github.ref_name }} https://github.com/${{ github.repository }} src
163166
pushd src
164167
git submodule init
165168
git config submodule.src/tests/integration.update none
@@ -293,7 +296,7 @@ jobs:
293296
run: |
294297
# Note that we can't make a shallow clone to reduce clone traffic and time, as we have to
295298
# fetch the entire history to correctly generate the version for the installation package filename
296-
git clone -b ${{ github.ref_name }} https://github.com/${{ github.repository }} src
299+
git clone -b ${{ inputs.branch || github.ref_name }} https://github.com/${{ github.repository }} src
297300
pushd src
298301
git submodule init
299302
git config submodule.src/tests/integration.update none
@@ -368,7 +371,7 @@ jobs:
368371
run: |
369372
# Note that we can't make a shallow clone to reduce clone traffic and time, as we have to
370373
# fetch the entire history to correctly generate the version for the disk image filename
371-
git clone -b ${{ github.ref_name }} https://github.com/${{ github.repository }} src
374+
git clone -b ${{ inputs.branch || github.ref_name }} https://github.com/${{ github.repository }} src
372375
pushd src
373376
git submodule init
374377
git config submodule.src/tests/integration.update none

0 commit comments

Comments
 (0)