-
Notifications
You must be signed in to change notification settings - Fork 20
54 lines (43 loc) · 1.66 KB
/
update_head.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Update Ghidra Sleigh
on:
schedule:
- cron: '0 0 * * 1'
# Should only be manually run on default branch (master)
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# Use oldest supported version for maximum script compatibility
python-version: '3.7'
- name: Run Update Script
id: head_update
run: |
# Sets some outputs. See next step
python3 scripts/update_ghidra_head.py --ci
# Need this to run further Actions on the newly created PR
# See here for more details https://github.com/peter-evans/create-pull-request/blob/28fa4848947e0faa7fa50647691d01477589d5e9/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
- uses: tibdex/github-app-token@v2
if: steps.head_update.outputs.did_update
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create PR
if: steps.head_update.outputs.did_update
uses: peter-evans/create-pull-request@v7
with:
title: Update Ghidra HEAD to commit ${{ steps.head_update.outputs.short_sha }}
commit-message: |
Bump Ghidra HEAD commit ${{ steps.head_update.outputs.short_sha }}
Changed files:
${{ steps.head_update.outputs.changed_files }}
body: |
Changed files:
${{ steps.head_update.outputs.changed_files }}
branch: cron/update-ghidra-${{ steps.head_update.outputs.short_sha }}
delete-branch: true
token: ${{ steps.generate-token.outputs.token }}