Skip to content

Commit

Permalink
Provide default value for version
Browse files Browse the repository at this point in the history
  • Loading branch information
turion committed Jan 7, 2024
1 parent 8d5f0b7 commit ac2c029
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -49,3 +49,15 @@ jobs:
run: cabal new-build
- name: Test
run: cabal new-test all
test-generate-matrix-default:
name: "Tests whether generating the matrix from cabal works with a default version"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: turion/get-tested@v0.1.6.0
with:
cabal-file: get-tested.cabal
ubuntu: true
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ runs:
shell: bash
run: |
# Extract e.g. 0.1 from /runner/foo/bar/.../v0.1
wget -q https://github.com/Kleidukos/get-tested/releases/download/v${{ inputs.version }}/get-tested-${{ inputs.version }}-linux-amd64 -O get-tested
export DEFAULT_VERSION=$(basename $GITHUB_ACTION_PATH | tail -c +2)
export VERSION=${{ inputs.version }}
VERSION=${:-}
wget -q https://github.com/Kleidukos/get-tested/releases/download/v$VERSION/get-tested-$VERSION-linux-amd64 -O get-tested
chmod +x get-tested
echo "::debug:: Windows enabled: ${{ inputs.windows }}"
Expand Down

0 comments on commit ac2c029

Please sign in to comment.