📝 fingerprint-update #288
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: 📝 fingerprint-update | |
on: | |
push: | |
branches: | |
- main | |
workflow_run: | |
workflows: [ "add labels" ] | |
types: | |
- completed | |
env: | |
IS_GITHUB: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.repository == '0x727/FingerprintHub' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11.0" | |
- name: Update FingerPrint | |
id: update-fingerprint | |
run: | | |
python -m pip install --upgrade pip | |
pip install PyYAML | |
pip install GitPython | |
python .github/scripts/auto_update.py | |
git clone --depth 100 --branch main https://github.com/projectdiscovery/nuclei-templates | |
python .github/scripts/tags_to_plugins.py | |
find . -path "*.pyc" -delete | |
echo "::set-output name=changes::$(git status -s | wc -l)" | |
- name: Commit files | |
if: steps.update-fingerprint.outputs.changes > 0 | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Auto Update FingerPrint [$(date)] :robot:" -a | |
- name: Push changes | |
if: steps.update-fingerprint.outputs.changes > 0 | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |