nuclei-templates/.github/workflows/wordpress-plugins-update.yml

46 lines
1.5 KiB
YAML
Raw Normal View History

name: ✨ WordPress Plugins - Update
2023-01-05 10:56:27 +00:00
on:
2024-04-19 07:39:24 +00:00
schedule:
- cron: "0 0 * * *"
2023-01-05 10:56:27 +00:00
jobs:
Update:
runs-on: ubuntu-latest
2024-03-02 09:35:40 +00:00
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install Python3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- run: |
python -m pip install --upgrade pip
pip install -r .github/scripts/wordpress-plugins-update-requirements.txt
- name: Update Templates
id: update-templates
run: |
python3 .github/scripts/wordpress-plugins-update.py
git status -s | wc -l | xargs -I {} echo CHANGES={} >> $GITHUB_OUTPUT
- name: Commit files
if: steps.update-templates.outputs.CHANGES > 0
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add --all
git commit -m "Auto WordPress Plugins Update [$(date)] :robot:"
- name: Push changes
if: steps.update-templates.outputs.CHANGES > 0
uses: ad-m/github-push-action@master
with:
2022-12-29 08:45:17 +00:00
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}