Skip to content

Commit 7b53b4a

Browse files
committed
github: Fix specifying a commit rather than a branch for manual jobs
As the branch field has a default value "master", this default not only applies when the dialog box for starting the manual workflow is presented. But even if the prefilled branch field is cleared, the default value also gets substituted when submitting. In this case, when the commit and branch fields are mutually exclusive, we can't easily have a default. Instead change the uses of the fields, ignoring the branch field if the commit field is filled. If the dawidd6/action-download-artifact action would support specifying either a commit or a branch in the same field, like actions/checkout does, we wouldn't need this distinction at all; this request is tracked upstream at dawidd6/action-download-artifact#242.
1 parent 093d8ed commit 7b53b4a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
workflow: build.yml
3131
workflow_conclusion: success
3232
commit: ${{inputs.commit}}
33-
branch: ${{inputs.branch}}
33+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
3434
event: push
3535
name: parameters
3636
- name: Get build parameters
@@ -85,7 +85,7 @@ jobs:
8585
workflow: build.yml
8686
workflow_conclusion: success
8787
commit: ${{inputs.commit}}
88-
branch: ${{inputs.branch}}
88+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
8989
event: push
9090
name: linux-ucrt-.*
9191
name_is_regexp: true

.github/workflows/msvcrt.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
workflow: build.yml
3636
workflow_conclusion: success
3737
commit: ${{inputs.commit}}
38-
branch: ${{inputs.branch}}
38+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
3939
event: push
4040
name: parameters
4141
- name: Get build parameters
@@ -58,7 +58,7 @@ jobs:
5858
workflow: build.yml
5959
workflow_conclusion: success
6060
commit: ${{inputs.commit}}
61-
branch: ${{inputs.branch}}
61+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
6262
event: push
6363
name: linux-ucrt-x86_64-toolchain
6464
- name: Unpack original toolchain

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
workflow: build.yml
4545
workflow_conclusion: success
4646
commit: ${{inputs.commit}}
47-
branch: ${{inputs.branch}}
47+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
4848
event: push
4949
- name: Rearrange files
5050
run: |

.github/workflows/test-libcxx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
workflow: build.yml
3131
workflow_conclusion: success
3232
commit: ${{inputs.commit}}
33-
branch: ${{inputs.branch}}
33+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
3434
event: ${{inputs.pipeline_type}}
3535
name: parameters
3636
- name: Get build parameters
@@ -60,7 +60,7 @@ jobs:
6060
workflow: build.yml
6161
workflow_conclusion: success
6262
commit: ${{inputs.commit}}
63-
branch: ${{inputs.branch}}
63+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
6464
event: ${{inputs.pipeline_type}}
6565
name: windows-ucrt-${{matrix.arch}}-toolchain
6666
- name: Unpack toolchain

.github/workflows/test-llvm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
workflow: build.yml
3131
workflow_conclusion: success
3232
commit: ${{inputs.commit}}
33-
branch: ${{inputs.branch}}
33+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
3434
event: ${{inputs.pipeline_type}}
3535
name: parameters
3636
- name: Get build parameters
@@ -58,7 +58,7 @@ jobs:
5858
workflow: build.yml
5959
workflow_conclusion: success
6060
commit: ${{inputs.commit}}
61-
branch: ${{inputs.branch}}
61+
branch: ${{inputs.commit == '' && inputs.branch || ''}}
6262
event: ${{inputs.pipeline_type}}
6363
name: windows-ucrt-${{matrix.arch}}-toolchain
6464
- name: Unpack toolchain

0 commit comments

Comments
 (0)