Skip to content

Commit ea8517a

Browse files
committed
fix: adapt CI to new layout
1 parent 7d87097 commit ea8517a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/nix.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939
# Remove the begining of the README to extract the example.
4040
(echo '```toml'; sed -e '1,/```toml/d' README.md) > EXAMPLE_README.md
4141
while read FILE ; do
42-
[ "$(dirname "$FILE")" != advisories/reserved ] || continue
4342
echo -n "$FILE: "
4443
docker run --rm -v $PWD:/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools check "$FILE" || RESULT=1
45-
done < <(find advisories EXAMPLE_README.md EXAMPLE_ADVISORY.md -type f -name "*.md")
44+
done < <(find advisories/published EXAMPLE_README.md EXAMPLE_ADVISORY.md -type f -name "*.md")
4645
exit $RESULT
4746
- name: Run advisory uniqueness checks
4847
run: |
49-
! find advisories -type f -name '*.md' -print0 \
50-
| xargs -0n1 basename | sort | uniq -c | grep -E -v '[[:space:]]*1 '
48+
! find advisories/published -type f -name '*.md' \
49+
| sed -E 's|.*/([0-9]+)/([0-9]+)\.md|\1/\2.md|' \
50+
| sort | uniq -c | grep -E -v '[[:space:]]*1 '
5151
- name: Generate OSV data
5252
run: |
5353
DATA_DIR=$PWD/osv
@@ -58,7 +58,7 @@ jobs:
5858
YEAR=$(echo "$ID" | cut -d - -f 2)
5959
mkdir -p $DATA_DIR/$YEAR
6060
docker run --rm -v $PWD:/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools osv "$FILE" > $DATA_DIR/$YEAR/$ID.json
61-
done < <(find advisories -type f -name "*.md" | grep -v '^advisories/reserved/')
61+
done < <(find advisories/published -type f -name "*.md")
6262
- name: Validate OSV data
6363
run: |
6464
curl -OL https://raw.githubusercontent.com/ossf/osv-schema/refs/heads/main/validation/schema.json
@@ -84,7 +84,7 @@ jobs:
8484
- name: Generate snapshot data
8585
run: |
8686
docker run --rm -v $PWD:/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools generate-snapshot . snapshot
87-
diff -r advisories snapshot/advisories | grep -v gitkeep | grep -v 'Only in advisories: reserved' | grep Only && echo 'Some advisories have been created/deleted' && exit 1 || exit 0
87+
diff -r advisories/published snapshot/advisories/published | grep -v gitkeep | grep Only && echo 'Some advisories have been created/deleted' && exit 1 || exit 0
8888
- name: Publish snapshot data
8989
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'haskell/security-advisories' }}
9090
env:

0 commit comments

Comments
 (0)