The ./hs Docker wrapper runs docker inside the Gitea runner container. Since project paths inside the runner container don't exist on the Docker host, the volume mount creates an empty /work directory, and Stack finds no packages (error S-8506). Fix: install Stack directly via get.haskellstack.org, use STACK_ROOT for caching, and build with stack directly (no Docker-in-Docker). Also add symlink for gitea-actions.sh convenience script.
This commit is contained in:
@@ -9,24 +9,26 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CONVERGE_HASKELL_TOOLS_IMAGE: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d
|
STACK_ROOT: .stack-root
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
path: .
|
- name: Install Stack
|
||||||
|
run: |
|
||||||
|
curl -sSL https://get.haskellstack.org/ | sh
|
||||||
|
|
||||||
- name: Cache Stack
|
- name: Cache Stack
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .stack-root
|
path: .stack-root
|
||||||
key: stack-${{ runner.os }}-${{ hashFiles('stack.yaml', 'package.yaml') }}
|
key: stack-v2-${{ runner.os }}-${{ hashFiles('stack.yaml', 'package.yaml') }}
|
||||||
restore-keys: stack-${{ runner.os }}-
|
restore-keys: stack-v2-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
mkdir -p .stack-root build
|
mkdir -p build
|
||||||
./hs stack build --copy-bins --local-bin-path /work/build
|
stack build --copy-bins --local-bin-path ./build
|
||||||
|
|
||||||
- name: Compress with UPX
|
- name: Compress with UPX
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../.pi/skills/gitea-actions/scripts/gitea-actions.sh
|
||||||
Reference in New Issue
Block a user