name: Generate JSON Metadata of CVE Templates on: push: tags: - '*' workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Set up Go uses: actions/setup-go@v3 with: go-version: 1.19 check-latest: true - name: run yaml2json.go to generate cves.json run: | go env -w GO111MODULE=off go get gopkg.in/yaml.v3 go run .github/scripts/yaml2json.go /home/runner/work/nuclei-templates/nuclei-templates/cves/ cves.json - name: Commit files run: | git pull git add cves.json git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -m "Auto Generated cves.json [$(date)] :robot:" -a - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: master