Skip to content

Bump docker/build-push-action from 6.7.0 to 6.8.0 #715

Bump docker/build-push-action from 6.7.0 to 6.8.0

Bump docker/build-push-action from 6.7.0 to 6.8.0 #715

Workflow file for this run

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@dd344bc1cec854a369df8814ce17ef337d6e6170 # v2.7.6
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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: coverage-report
path: ${{ steps.coverage.outputs.report }}