mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-01-31 15:53:33 +08:00
merge workflow and only resign windows templates
This commit is contained in:
51
.github/workflows/template-sign.yml
vendored
51
.github/workflows/template-sign.yml
vendored
@@ -9,8 +9,8 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Sign All Templates
|
||||
linux-sign:
|
||||
name: Sign All Templates (Linux)
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates'
|
||||
steps:
|
||||
@@ -28,4 +28,49 @@ jobs:
|
||||
- name: Push changes
|
||||
run: |
|
||||
git pull origin $GITHUB_REF --rebase
|
||||
git push origin $GITHUB_REF
|
||||
git push origin $GITHUB_REF
|
||||
|
||||
windows-sign:
|
||||
name: Sign Windows Templates
|
||||
needs: linux-sign
|
||||
runs-on: windows-latest
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Install Nuclei
|
||||
run: |
|
||||
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
|
||||
nuclei -version
|
||||
shell: bash
|
||||
|
||||
- name: Sign Windows Templates
|
||||
run: nuclei -lfa -duc -sign -ud "${{ github.workspace }}" -t "code/windows/audit"
|
||||
shell: bash
|
||||
env:
|
||||
NUCLEI_USER_CERTIFICATE: ${{ secrets.NUCLEI_USER_CERTIFICATE }}
|
||||
NUCLEI_USER_PRIVATE_KEY: ${{ secrets.NUCLEI_USER_PRIVATE_KEY }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Ghost"
|
||||
git config --global user.email "ghost@users.noreply.github.com"
|
||||
shell: bash
|
||||
|
||||
- name: Commit Changes
|
||||
run: |
|
||||
git add code/windows/audit
|
||||
git commit -m "chore: re-sign windows templates 🤖" || echo "No changes to commit"
|
||||
shell: bash
|
||||
|
||||
- name: Push Changes
|
||||
run: |
|
||||
git remote update
|
||||
git pull origin ${{ github.ref }} --rebase || exit 1
|
||||
git push origin ${{ github.ref }} || (git remote update && git pull origin ${{ github.ref }} --rebase && git push origin ${{ github.ref }})
|
||||
shell: bash
|
||||
49
.github/workflows/windows-resign.yml
vendored
49
.github/workflows/windows-resign.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: Windows Template Resign
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
windows-resign:
|
||||
name: Re-sign Templates on Windows
|
||||
runs-on: windows-latest
|
||||
if: github.repository == 'projectdiscovery/nuclei-templates'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Install Nuclei
|
||||
run: |
|
||||
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
|
||||
nuclei -version
|
||||
shell: bash
|
||||
|
||||
- name: Sign Templates
|
||||
run: nuclei -lfa -duc -sign -ud "${{ github.workspace }}" -t "."
|
||||
shell: bash
|
||||
env:
|
||||
NUCLEI_USER_CERTIFICATE: ${{ secrets.NUCLEI_USER_CERTIFICATE }}
|
||||
NUCLEI_USER_PRIVATE_KEY: ${{ secrets.NUCLEI_USER_PRIVATE_KEY }}
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Ghost"
|
||||
git config --global user.email "ghost@users.noreply.github.com"
|
||||
shell: bash
|
||||
|
||||
- name: Commit Changes
|
||||
run: |
|
||||
git add .
|
||||
git commit -m "chore: re-sign templates on windows 🤖" || echo "No changes to commit"
|
||||
shell: bash
|
||||
|
||||
- name: Push Changes
|
||||
run: |
|
||||
git remote update
|
||||
git pull origin ${{ github.ref }} --rebase || exit 1
|
||||
git push origin ${{ github.ref }} || (git remote update && git pull origin ${{ github.ref }} --rebase && git push origin ${{ github.ref }})
|
||||
shell: bash
|
||||
Reference in New Issue
Block a user