Fix Gitea Actions workflow: use docker run instead of container to avoid missing node
Build / build (push) Failing after 1m34s

This commit is contained in:
2026-05-11 21:56:56 -04:00
parent 60c2a9a5f8
commit 403ab6bd17
+22 -7
View File
@@ -8,9 +8,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d
env:
IMAGE: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d
STACK_ROOT: /tmp/.stack-root
steps:
- name: Checkout
@@ -24,18 +23,34 @@ jobs:
restore-keys: stack-${{ runner.os }}-
- name: Build
run: stack build --copy-bins --local-bin-path /tmp/build
run: |
docker run --rm \
-v "$(pwd):/work" \
-v "/tmp/.stack-root:/stack-root" \
-e STACK_ROOT=/stack-root \
-w /work \
"$IMAGE" \
stack build --copy-bins --local-bin-path /work/build
- name: Compress with UPX
run: |
docker run --rm \
-v "$(pwd):/work" \
-w /work \
"$IMAGE" \
bash -c '
UPX_VERSION="5.1.1"
curl -fsSL "https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz" \
| tar -xJ -C /tmp
/tmp/upx-${UPX_VERSION}-amd64_linux/upx /tmp/build/converge
UPX_URL="https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz"
UPX_DIR="/tmp/upx-${UPX_VERSION}-amd64_linux"
if [ ! -x "${UPX_DIR}/upx" ]; then
curl -fsSL "${UPX_URL}" | tar -xJ -C /tmp
fi
"${UPX_DIR}/upx" /work/build/converge
'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: converge
path: /tmp/build/converge
path: build/converge
compression-level: 0