Skip to content

Commit f25589a

Browse files
committed
Use ghc for release in dogfooding
Using validate job outputs cause it seems you can't use the env context directly in matrix
1 parent c2ab256 commit f25589a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/validate.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
validate:
3333
name: Validate ${{ matrix.os }} ghc-${{ matrix.ghc }}
3434
runs-on: ${{ matrix.os }}
35+
outputs:
36+
GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }}
3537
strategy:
3638
fail-fast: true
3739
matrix:
@@ -99,7 +101,6 @@ jobs:
99101
brew install automake
100102
101103
- name: Set validate inputs
102-
id: validate-inputs
103104
run: |
104105
FLAGS=""
105106
if [[ "${{ matrix.cli }}" == "false" ]]; then
@@ -243,7 +244,9 @@ jobs:
243244
matrix:
244245
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
245246
# We only use one ghc version the used one for the next release (defined at top of the workflow)
246-
ghc: ["8.10.7"]
247+
# We need to build an array dynamically to inject the appropiate env var in a previous job,
248+
# see https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson
249+
ghc: ${{ fromJSON (needs.validate.outputs.GHC_FOR_RELEASE) }}
247250

248251
steps:
249252
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)