║ error: failed to create directory `/build/runtime/altair/target`
║
║ Caused by:
║ Permission denied (os error 13)
parse error: Invalid numeric literal at line 1, column 11
I'm getting that error when running the action:
- name: Build ${{ matrix.chain }}
id: srtool_build
uses: chevdor/srtool-actions@v0.8.0
env:
BUILD_OPTS: "--features on-chain-release-build"
with:
chain: ${{ matrix.chain }}
# package: ${{ matrix.chain }}
# runtime_dir: ${{ matrix.runtime.path }}
workdir: ${{ github.workspace }}
profile: "release"
Before this we were using our own workflow with the docker command:
- name: Run srtool # https://docs.substrate.io/reference/command-line-tools/srtool/
run: >
docker run --rm --user root --platform=linux/amd64
-e PACKAGE=${{ matrix.chain }} -e BUILD_OPTS="--features=on-chain-release-build" -v /home/runner/.cargo:/cargo-home
-v ${{ github.workspace }}:/build paritytech/srtool:1.77.0-0.15.0
/srtool/build --app
Notice the --user root which is probably why it worked on our case. Not sure why nobody else is running into this issue as the GHA runners run with user runner and the docker container probably has a different user ID which means it probably can't create folders inside the {{github.workspace}}
Some output in case it helps:
ℹ️ SRTOOL_LATEST: 1.77.0
ℹ️ image: paritytech/srtool:1.77.0
ℹ️ chain: altair
ℹ️ package: altair-runtime
ℹ️ workdir: /home/runner/work/centrifuge-chain/centrifuge-chain
ℹ️ runtime_dir: runtime/altair
ℹ️ build_opts: --features on-chain-release-build
ℹ️ parachain_pallet_id: 0x01
ℹ️ profile: release
ℹ️ authorize_upgrade_prefix: 0x02
ℹ️ .git folder: drwxr-xr-x 8 runner runner 4096 Jul 8 10:51 /home/runner/work/centrifuge-chain/centrifuge-chain/.git
ℹ️ Cargo.toml: -rw-r--r-- 1 runner runner 35584 Jul 8 10:51 /home/runner/work/centrifuge-chain/centrifuge-chain/Cargo.toml
Maybe the action should make sure it has enough permissions to write in the build directory and if not change the permissions before running the container?
I'm getting that error when running the action:
Before this we were using our own workflow with the docker command:
Notice the --user root which is probably why it worked on our case. Not sure why nobody else is running into this issue as the GHA runners run with user
runnerand the docker container probably has a different user ID which means it probably can't create folders inside the {{github.workspace}}Some output in case it helps:
Maybe the action should make sure it has enough permissions to write in the build directory and if not change the permissions before running the container?