Bump docker/login-action from 3.2.0 to 3.3.0 (#207) #675
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
permissions: read-all | |
on: | |
push: | |
workflow_call: | |
inputs: | |
coverage: | |
required: false | |
type: boolean | |
jobs: | |
build: | |
concurrency: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2.7.5 | |
with: | |
enable-stack: true | |
- name: Cache dependencies | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ~/.stack | |
key: stack-${{ hashFiles('package.yaml', 'stack.yaml') }} | |
restore-keys: stack- | |
- name: Cache build artifacts | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: .stack-work | |
key: build-${{ hashFiles('app/**', 'src/**', 'test/**') }} | |
restore-keys: build- | |
- name: Build and test | |
if: ${{ !inputs.coverage }} | |
run: stack build --test | |
- name: Coverage | |
id: coverage | |
if: ${{ inputs.coverage }} | |
run: | | |
stack build --test --coverage | |
echo "report=$(stack path --local-hpc-root)" >> $GITHUB_OUTPUT | |
- name: Upload coverage report | |
if: ${{ inputs.coverage }} | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | |
with: | |
name: coverage-report | |
path: ${{ steps.coverage.outputs.report }} |