Update Submodules and Create PR #51
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: Update Submodules and Create PR | |
on: | |
schedule: | |
- cron: "8 0 * * 5" | |
jobs: | |
update-submodules: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Update submodules | |
run: | | |
git submodule update --remote --recursive | |
- name: Check for changes | |
id: check_changes | |
run: | | |
git diff --exit-code || echo "changes=true" >> $GITHUB_ENV | |
- name: Exit if no changes | |
if: env.changes != 'true' | |
run: exit 0 | |
- uses: actions/setup-python@v4 | |
- name: Install pyyaml | |
run: pip install pyyaml | |
- name: Patch script | |
run: python gtfobin_update.py | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
title: "Update GTFOBins" | |
branch: update-gtfobins-${{ github.run_id }} | |
body: "This is an automated PR to update the GTFOBin submodule." | |
delete-branch: true | |
commit-message: "feat: Update GTFOBins" |