diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index babd622..4965b7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,13 +9,17 @@ on: jobs: generate-matrix: name: "Generate matrix from cabal" + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} runs-on: ubuntu-latest steps: - name: Extract the tested GHC versions - uses: kleidukos/get-tested@v0.1.6.0 + id: set-matrix + uses: kleidukos/get-tested@f111f862f481884c26faa691de3c51ae110cc766 with: cabal-file: get-tested.cabal ubuntu: true + version: 0.1.6.0 tests: name: ${{ matrix.ghc }} on ${{ matrix.os }} needs: generate-matrix @@ -27,7 +31,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Haskell id: setup-haskell - uses: haskell/actions/setup@v2 + uses: haskell-actions/setup@v2 with: ghc-version: ${{ matrix.ghc }} cabal-version: 'latest' diff --git a/action.yml b/action.yml index e51207b..e4b9167 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,9 @@ inputs: cabal-file: description: "The path to your cabal file, e.g. somefolder/myproject.cabal" required: true + version: + description: "Version of the tool" + required: true windows: description: "Enable Windows runner" required: false @@ -32,8 +35,7 @@ runs: shell: bash run: | # Extract e.g. 0.1 from /runner/foo/bar/.../v0.1 - export version=$(basename $GITHUB_ACTION_PATH | tail -c +2) - wget -q https://github.com/Kleidukos/get-tested/releases/download/v${version}/get-tested-${version}-linux-amd64 -O get-tested + wget -q https://github.com/Kleidukos/get-tested/releases/download/v${{ inputs.version }}/get-tested-${{ inputs.version }}-linux-amd64 -O get-tested chmod +x get-tested echo "::debug:: Windows enabled: ${{ inputs.windows }}" @@ -55,7 +57,6 @@ runs: id: set-matrix shell: bash run: | - ./get-tested $WINDOWS $MACOS $UBUNTU ${{ inputs.cabal-file }} ./get-tested $WINDOWS $MACOS $UBUNTU ${{ inputs.cabal-file }} >> $GITHUB_OUTPUT branding: