2022-12-07 09:24:33 +00:00
|
|
|
name: 📝 Template Checksum
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
2023-01-15 16:05:57 +00:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: 1.19
|
|
|
|
check-latest: true
|
|
|
|
cache: true
|
2022-12-07 09:24:33 +00:00
|
|
|
|
|
|
|
- name: install checksum generator
|
|
|
|
run: |
|
|
|
|
go install -v github.com/projectdiscovery/nuclei/v2/cmd/generate-checksum@dev
|
|
|
|
|
|
|
|
- name: generate checksum
|
|
|
|
run: |
|
|
|
|
generate-checksum /home/runner/work/nuclei-templates/nuclei-templates/ templates-checksum.txt
|
|
|
|
|
|
|
|
- name: Commit files
|
|
|
|
run: |
|
2022-12-07 09:26:54 +00:00
|
|
|
git pull
|
2022-12-07 09:24:33 +00:00
|
|
|
git add templates-checksum.txt
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
git commit -m "Auto Generated Templates Checksum [$(date)] :robot:" -a
|
|
|
|
|
|
|
|
- name: Push changes
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: master
|