2022-12-07 09:24:33 +00:00
|
|
|
name: 📝 Template Checksum
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-03-18 09:19:20 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- '**.yaml'
|
2024-08-05 02:48:40 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
CHECKSUM_FILE: 'templates-checksum.txt'
|
2022-12-07 09:24:33 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-06-03 18:06:19 +00:00
|
|
|
checksum:
|
2022-12-07 09:24:33 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-30 17:57:25 +00:00
|
|
|
if: github.repository == 'projectdiscovery/nuclei-templates'
|
2022-12-07 09:24:33 +00:00
|
|
|
steps:
|
2023-09-12 10:36:40 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-08-05 02:48:40 +00:00
|
|
|
- uses: projectdiscovery/actions/generate/checksum@v1
|
2023-01-15 16:05:57 +00:00
|
|
|
with:
|
2024-08-05 02:48:40 +00:00
|
|
|
templates-directory: '${{ github.workspace }}'
|
|
|
|
checksum-file: '${{ env.CHECKSUM_FILE }}'
|
2024-08-14 01:34:06 +00:00
|
|
|
- run: git status
|
2024-08-05 02:48:40 +00:00
|
|
|
- uses: projectdiscovery/actions/setup/git@v1
|
2024-08-14 01:40:59 +00:00
|
|
|
- uses: projectdiscovery/actions/commit@master
|
2024-08-05 02:48:40 +00:00
|
|
|
with:
|
|
|
|
files: '${{ env.CHECKSUM_FILE }}'
|
2024-08-08 21:07:20 +00:00
|
|
|
message: 'chore: generate templates checksum 🤖'
|
2022-12-07 09:24:33 +00:00
|
|
|
- name: Push changes
|
2023-06-20 12:53:35 +00:00
|
|
|
run: |
|
2024-08-08 23:49:33 +00:00
|
|
|
git pull origin $GITHUB_REF --rebase
|
2024-08-05 02:48:40 +00:00
|
|
|
git push origin $GITHUB_REF
|