Skip to content

Commit c1c3cc3

Browse files
authored
chore: copy bundle-size to root (#877)
Docker actions get their workspace overridden as `/docker/workspace`. Your project files are copied to that folder \*after* your docker file is run but \*before* the `CMD` directive is executed, so you can't copy anything to that folder and expect it to still be there. The contents of `/docker/workspace` are the project, not the gh action, so `dist/index.js` does not exist. We don't ship gh actions with aegir so you can't use `/docker/workspace/node_modules/aegir/actions/bundle-size/dist/index.js` either. Also, you can't use slashes in branch names for gh actions as they get copied onto the filesystem then the directory structure doesn't match up. The working directory of the docker image is `/docker/workspace` so we can copy the bundle size index.js to the root and run it from there but check the size of the current project due to the CWD being set to the docker workspace. This branch is building * a CJS module here: multiformats/js-multiaddr#207 * a ESM module here: achingbrain/uint8arrays#26
1 parent 9be848d commit c1c3cc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

actions/bundle-size/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Just enough docker until github gets a new node16 runner
22
# see: https://github.com/actions/runner/issues/772
33
FROM node:16-alpine
4-
WORKDIR /usr/src/app
5-
CMD [ "node", "dist/index.js" ]
4+
COPY ./dist/index.js /bundle-size.js
5+
CMD [ "node", "/bundle-size.js" ]

0 commit comments

Comments
 (0)