-
Notifications
You must be signed in to change notification settings - Fork 71
39 lines (35 loc) · 1.08 KB
/
update-submodules.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"