-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fbbee2
commit eb3f994
Showing
1 changed file
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,6 @@ jobs: | |
uses: DeterminateSystems/flake-checker-action@v4 | ||
- name: Build executable (hsec-tools) | ||
run: nix -L build | ||
- name: Build executable (hsec-sync) | ||
run: nix -L build '.#hsec-sync' | ||
- name: Build docker image | ||
run: nix build -L '.#packages.x86_64-linux.hsec-tools-image' | ||
- run: mkdir -p ~/.local/dockerImages | ||
|
@@ -62,22 +60,34 @@ jobs: | |
docker run --rm -v $PWD:/repo --workdir /repo haskell/hsec-tools:latest /bin/hsec-tools osv "$FILE" > $DATA_DIR/$YEAR/$ID.json | ||
done < <(find advisories -type f -name "*.md" | grep -v '^advisories/reserved/') | ||
- name: Publish OSV data | ||
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'haskell/security-advisories' }} | ||
# if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'haskell/security-advisories' }} | ||
env: | ||
GITHUB_SHA: ${{ github.sha }} | ||
run: | | ||
echo "-1" | ||
DATA_DIR=$PWD/osv | ||
BRANCH=generated/osv-export | ||
REF=refs/remotes/origin/$BRANCH | ||
echo "0" | ||
export GIT_WORK_TREE=$DATA_DIR | ||
git read-tree "$REF" | ||
echo "1" | ||
git add --all --intent-to-add | ||
echo "2" | ||
git diff --quiet && exit | ||
echo "3" | ||
git add --all | ||
echo "4" | ||
TREE=$(git write-tree) | ||
echo "5" | ||
git config user.email [email protected] | ||
echo "6" | ||
git config user.name "Haskell Security Response Team" | ||
echo "7" | ||
COMMIT=$(git commit-tree "$TREE" -p "$REF" -m "$(date --utc --rfc-3339=seconds) ($GITHUB_SHA)") | ||
echo "8" | ||
git push origin $COMMIT:$BRANCH | ||
echo "9" | ||
- name: Generate the website | ||
run: | | ||
mkdir generatedWebsite | ||
|