2023-06-20 12:53:35 +00:00
|
|
|
name: 📝 CVE JSON Metadata
|
2023-01-18 03:10:28 +00:00
|
|
|
|
|
|
|
on:
|
2023-02-19 00:57:32 +00:00
|
|
|
push:
|
2023-02-19 08:45:04 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2023-02-19 00:57:32 +00:00
|
|
|
paths:
|
2024-08-05 02:48:40 +00:00
|
|
|
- '**/cves/**'
|
|
|
|
workflow_dispatch:
|
2023-01-18 03:10:28 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-02-19 08:45:04 +00:00
|
|
|
cve2json:
|
2023-01-18 03:10:28 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-07-12 20:22:59 +00:00
|
|
|
if: github.repository == 'projectdiscovery/nuclei-templates'
|
2023-01-18 03:10:28 +00:00
|
|
|
steps:
|
2024-08-05 02:48:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: projectdiscovery/actions/setup/go@v1
|
2023-01-18 03:10:28 +00:00
|
|
|
with:
|
2024-08-05 02:48:40 +00:00
|
|
|
go-version: 'stable'
|
|
|
|
- run: go run main.go $GITHUB_WORKSPACE/http/cves/,$GITHUB_WORKSPACE/network/cves/ $GITHUB_WORKSPACE/cves.json
|
|
|
|
working-directory: .github/scripts/yaml2json
|
|
|
|
- run: md5sum cves.json | cut -d' ' -f1 > cves.json-checksum.txt
|
|
|
|
- uses: projectdiscovery/actions/setup/git@v1
|
|
|
|
- uses: projectdiscovery/actions/commit@v1
|
|
|
|
with:
|
|
|
|
files: 'cves.json*'
|
|
|
|
message: 'chore: generate CVEs metadata 🤖'
|
2023-01-18 03:10:28 +00:00
|
|
|
- name: Push changes
|
2023-06-20 12:53:35 +00:00
|
|
|
run: |
|
|
|
|
git pull --rebase
|
2024-08-05 02:48:40 +00:00
|
|
|
git push origin $GITHUB_REF
|