-
Notifications
You must be signed in to change notification settings - Fork 51
46 lines (39 loc) · 1.2 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Build"
permissions:
contents: read
pages: write
id-token: write
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: "docker://ghcr.io/chrisdone/hell-build@sha256:7ae851ef826695d132959f71fb01807bf009222406697bc714c4a1be747e4d72"
env:
# For the ~/.stack root.
HOME: /home/chris/
STACK_ROOT: /home/chris/.stack
# This can be both of these, depending on whether it's a PR or
# main. GitHub Actions is weird.
#
# * "GIT_BRANCH=refs/heads/main"
# * "GIT_BRANCH=cd/2024-08-28-check-examples"
#
GIT_BRANCH: ${{ github.head_ref || github.ref }}
steps:
- run: |
git clone https://github.com/chrisdone/hell /tmp/hell && \
cd /tmp/hell && \
git checkout $GIT_BRANCH
- run: |
cd /tmp/hell && stack build --fast
- run: |
cd /tmp/hell && stack exec hell scripts/check-examples.hell
- run: |
cd /tmp/hell && HOME=/home/chris/ stack exec hell scripts/check-docs.hell