Skip to content

generate_ghdb_wl

generate_ghdb_wl #40

name: generate_ghdb_wl
on:
schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 32768 # vuln-list dirs + language repositories use more than 12GB of storage
remove-android: "true"
remove-docker-images: "true"
remove-dotnet: "true"
remove-haskell: "true"
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Install scraper_ghdb
run: python3 -m pip install -r scripts/ghdb_scraper/requirements.txt
- name: Run scraper_ghdb
run: python3 scripts/ghdb_scraper/ghdb_scraper.py -o "wordlists/ghdb.json"
- name: Commit results to GitHub
run: |
git config --local user.email "[email protected]"
git config --local user.name "ghdb"
git add wordlists/ghdb.json
git commit -m "Bot ghdb auto update" -a || echo "No changes to commit"
- name: Push changes
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const github = require('@actions/github');
const { exec } = require('child_process');
exec('git push origin HEAD:${{ github.ref }}', (error, stdout, stderr) => {
if (error) {
core.setFailed(`Push failed: ${error.message}`);
return;
}
console.log(stdout);
console.error(stderr);
});