Implement new package scanner (#2532)

* Implement new package scanner

* Replace hardcoded repository paths in getmergebase.sh

* Create branch instead of working on detached head in getmergebase.sh

* Checkout with unlimited depth

* Fix package_scanner command line

* Merge new package scanner

* Improve debug information of germergebase.sh

* Remove validate_json.js as package_scanner already validates json

* Improve documentation of getmergebase.sh

* Close http client at the end of the program

* Address code review comments

* Fix normalization of aliases
This commit is contained in:
Gabriel Huber
2023-03-14 10:40:45 +08:00
committed by GitHub
parent a001193eff
commit 44e7ea517b
5 changed files with 266 additions and 183 deletions
+17
View File
@@ -0,0 +1,17 @@
on: pull_request
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: iffy/install-nim@v3.2.2
with:
version: stable
- run: ./getmergebase.sh
- run: nim r -d:ssl -d:release package_scanner.nim packages.json --old=packages_old.json --check-urls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,16 +1,13 @@
on:
pull_request:
push:
on: push
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: iffy/install-nim@v3.2.2
with:
version: stable
- run: nim c -d:ssl -r -d:release package_scanner.nim
- run: nim c -d:ssl -r -d:release package_scanner.nim packages.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: node ./validate_json.js