Skip to content

Commit

Permalink
Add custom build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbg committed Jul 12, 2024
1 parent bc0ea16 commit 19f541e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/custom-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Custom Build"

"on":
workflow_dispatch:
inputs:
os:
description: "The runner label to use for the build"
required: false
type: string
default: "ubuntu-latest"
ghc:
description: "The version of GHC to use for the build"
required: false
type: string
resolver:
description: "The name of the resolver to use"
required: false
type: string

jobs:
custom-build:
runs-on: ${{ inputs.os }}

steps:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Remove existing Stack configuration"
shell: bash
run: |
# Remove custom.yaml if it exists
rm -f custom.yaml
- name: "Write resolver"
if: inputs.resolver != ''
shell: bash
run: |
echo "resolver: ${{ inputs.resolver }}\n" >> custom.yaml
- name: "Write ghc version"
if: inputs.ghc != ''
shell: bash
run: |
echo "compiler: ${{ inputs.ghc }}\n" >> custom.yaml
- name: "Build with Stack (custom configuration)"
uses: mbg/actions/stack/build@v0.1
with:
resolver: "custom"

0 comments on commit 19f541e

Please sign in to comment.