Create 13.1.3.yaml (#11) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ☑️ Template Sign | |
on: | |
push: | |
branches: | |
- dev | |
paths: | |
- '**.yaml' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.repository == 'OWASP/www-project-asvs-security-evaluation-templates-with-nuclei' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: projectdiscovery/actions/setup/nuclei@v1 | |
- run: nuclei -lfa -duc -sign -ud $GITHUB_WORKSPACE -t . | |
env: | |
NUCLEI_USER_CERTIFICATE: ${{ secrets.NUCLEI_USER_CERTIFICATE }} | |
NUCLEI_USER_PRIVATE_KEY: ${{ secrets.NUCLEI_USER_PRIVATE_KEY }} | |
# Set up GPG for automatic commit signing | |
- name: Set up GPG | |
run: | | |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | |
git config --global user.name "Signing Bot" | |
git config --global user.email "[email protected]" | |
git config --global commit.gpgSign true | |
git config --global user.signingkey ${{ secrets.GPG_KEY_ID }} | |
- uses: projectdiscovery/actions/setup/git@v1 | |
- uses: projectdiscovery/actions/commit@v1 | |
with: | |
files: '.' | |
message: 'chore: sign templates 🤖' | |
- name: Push changes | |
run: | | |
git pull origin $GITHUB_REF --rebase | |
git push origin $GITHUB_REF |