Skip to content

Commit 33eac73

Browse files
authored
Merge pull request haskell#10195 from haskell/workflow_dispatch
ci(validate.yml): Allow workflow_dispatch with no allow-newer or constraints
2 parents d037ce7 + a549f24 commit 33eac73

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/validate.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ on:
3131
inputs:
3232
allow-newer:
3333
description: allow-newer line
34-
required: true
34+
required: false
3535
type: string
3636
constraints:
3737
description: constraints line
38-
required: true
38+
required: false
3939
type: string
4040

4141
env:
@@ -92,11 +92,15 @@ jobs:
9292
- uses: actions/checkout@v4
9393

9494
# See https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#hackage-revisions
95-
- name: Manually supplied constraints/allow-newer
96-
if: github.event_name == 'workflow_dispatch'
95+
- name: Add manually supplied allow-newer
96+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.allow-newer != ''
9797
run: |
98-
echo "allow-newer: ${ALLOWNEWER}" >> cabal.validate.project
99-
echo "constraints: ${CONSTRAINTS}" >> cabal.validate.project
98+
echo "allow-newer: ${{ github.event.inputs.allow-newer }}" >> cabal.validate.project
99+
100+
- name: Add manually supplied constraints
101+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.constraints != ''
102+
run: |
103+
echo "constraints: ${{ github.event.inputs.constraints }}" >> cabal.validate.project
100104
101105
- uses: haskell-actions/setup@v2
102106
id: setup-haskell

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ it, someone with enough permissions needs to go on the
429429
[Validate workflow page](https://github.com/haskell/cabal/actions/workflows/validate.yml)
430430
and dispatch it manually by clicking "Run workflow".
431431

432-
Running workflow manually as discussed above requires you to supply two inputs:
432+
Running workflow manually as discussed above allows you to supply two inputs:
433433

434434
> allow-newer line
435435
> constraints line

0 commit comments

Comments
 (0)