Fix Gitea Actions workflow: use docker run instead of container to avoid missing node
Build / build (push) Failing after 1m34s
Build / build (push) Failing after 1m34s
This commit is contained in:
@@ -8,9 +8,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d
|
|
||||||
env:
|
env:
|
||||||
|
IMAGE: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d
|
||||||
STACK_ROOT: /tmp/.stack-root
|
STACK_ROOT: /tmp/.stack-root
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -24,18 +23,34 @@ jobs:
|
|||||||
restore-keys: stack-${{ runner.os }}-
|
restore-keys: stack-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Build
|
- 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
|
- name: Compress with UPX
|
||||||
run: |
|
run: |
|
||||||
UPX_VERSION="5.1.1"
|
docker run --rm \
|
||||||
curl -fsSL "https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz" \
|
-v "$(pwd):/work" \
|
||||||
| tar -xJ -C /tmp
|
-w /work \
|
||||||
/tmp/upx-${UPX_VERSION}-amd64_linux/upx /tmp/build/converge
|
"$IMAGE" \
|
||||||
|
bash -c '
|
||||||
|
UPX_VERSION="5.1.1"
|
||||||
|
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
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: converge
|
name: converge
|
||||||
path: /tmp/build/converge
|
path: build/converge
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user