Skip to content

Commit

Permalink
[ ci ] Grep only the digits from the GHC version
Browse files Browse the repository at this point in the history
  • Loading branch information
banacorn committed Nov 30, 2024
1 parent 3f010e1 commit 54fd07a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: 🔍 Determine stack resolver & GHC
run: |
STACK_RESOLVER=$(yq .resolver stack.yaml)
GHC_VERSION=$(yq .compiler stack.yaml)
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | grep -oP '\d+\.\d+\.\d+')
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: 🔍 Determine stack resolver & GHC
run: |
STACK_RESOLVER=$(yq .resolver stack.yaml)
GHC_VERSION=$(yq .compiler stack.yaml)
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | grep -oP '\d+\.\d+\.\d+')
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CI (Windows)

on:
push:
branches: [master, ci-*]
branches: [master, ci-*, ci]
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
STACK_ROOT="C:/Users/runneradmin/AppData/Local/Programs/stack/x86_64-windows"
STACK_RESOLVER=$(yq .resolver stack.yaml)
GHC_VERSION=$(yq .compiler stack.yaml)
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | grep -oP '\d+\.\d+\.\d+')
echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
Expand Down

0 comments on commit 54fd07a

Please sign in to comment.