35 lines
873 B
YAML
35 lines
873 B
YAML
name: 📝 Template Checksum
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '**.yaml'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CHECKSUM_FILE: 'templates-checksum.txt'
|
|
|
|
jobs:
|
|
checksum:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'projectdiscovery/nuclei-templates'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: projectdiscovery/actions/generate/checksum@v1
|
|
with:
|
|
templates-directory: '${{ github.workspace }}'
|
|
checksum-file: '${{ env.CHECKSUM_FILE }}'
|
|
- uses: projectdiscovery/actions/setup/git@v1
|
|
- uses: projectdiscovery/actions/commit@v1
|
|
with:
|
|
files: '${{ env.CHECKSUM_FILE }}'
|
|
commit: 'chore: generate templates checksum 🤖'
|
|
- name: Push changes
|
|
run: |
|
|
git pull --rebase
|
|
git push origin $GITHUB_REF
|