Skip to content

Commit 1aa37cd

Browse files
committed
CI: Fail if store paths are in the source
1 parent 15d6091 commit 1aa37cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ jobs:
3030
- uses: DeterminateSystems/determinate-nix-action@main
3131
- run: nix flake show --all-systems --json
3232

33+
no-store-paths-in-source:
34+
runs-on: UbuntuLatest32Cores128G
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
- run: |
40+
grep -r '/nix/store/[0123456789abcdfghijklmnpqrsvwxyz]\{32\}-' . || exit 0
41+
echo "Please do not put valid store paths in the documentation or source code."
42+
echo "This can cause fetching the artifact as a fixed-output derivation to fail if the store path is present in the fetching closure"
43+
exit 1
44+
3345
build_x86_64-linux:
3446
uses: ./.github/workflows/build.yml
3547
with:
@@ -78,6 +90,7 @@ jobs:
7890
- build_x86_64-linux
7991
- build_aarch64-linux
8092
- build_aarch64-darwin
93+
- no-store-paths-in-source
8194
if: ${{ always() }}
8295
steps:
8396
- run: "true"

0 commit comments

Comments
 (0)