Closed robertsLando closed 8 months ago
Why would you want to load the image and extract the tarball where you could just output files from your build using the local exporter: https://docs.docker.com/build/exporters/local-tar/?
You would not need the Extract binaries from Docker image
step or archive/load the whole image.
Just add an extra scratch stage in https://github.com/yao-pkg/pkg-fetch/blob/main/Dockerfile.linuxcross like:
FROM ubuntu:bionic AS build
...
ARG PKG_FETCH_OPTION_n
RUN yarn start --arch $PKG_FETCH_OPTION_a --node-range $PKG_FETCH_OPTION_n --output dist
FROM scratch
COPY --from=build /root/pkg-fetch /
Then in the workflow:
- name: Build
uses: docker/build-push-action@v5
with:
build-args: |
TARGET_TOOLCHAIN_ARCH=aarch64
PKG_FETCH_OPTION_a=arm64
PKG_FETCH_OPTION_n=node${{ matrix.target-node }}
context: .
file: ./Dockerfile.linuxcross
platforms: linux/amd64
outputs: root/pkg-fetch
Reason is that I never thought about your clever solution yet :) I'm tring to use the docker cp command now but I will give that a try. Anyway I dunno why previous code used to work for long time and now stopped working with that error
Anyway I dunno why previous code used to work for long time and now stopped working with that error
Best guess is not enough disk space on the runner
Ok so thanks again for the suggestion, it's much cleaner then the others I thought :) Can close this
Contributing guidelines
I've found a bug, and:
Description
I have set outputs to:
outputs: type=tar,dest=./out.tar
The exports throws:
https://github.com/yao-pkg/pkg-fetch/actions/runs/7744165698/job/21117282351#step:4:1149
Expected behaviour
The export to end successfully
Actual behaviour
Throws error
Repository URL
https://github.com/yao-pkg/pkg-fetch
Workflow run URL
https://github.com/yao-pkg/pkg-fetch/actions/runs/7744165698/job/21117282351#step:4:1149
YAML workflow
Workflow logs
No response
BuildKit logs
No response
Additional info
No response