-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (29 loc) · 1.1 KB
/
generate-diff.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
name: Generate Diff
on:
schedule:
- cron: '0 9 * * 5' # Every Friday at 9AM GMT (London time)
jobs:
generate-diff:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Git Configuration
run: |
git config diff.renameLimit 999999
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Generate Diff File # The referenced SHA is the last common ancestor commit.
run: |
git diff --summary --diff-filter=DMR 310c3f50ab7ae076b80c20f2cf20d5f42e095256 HEAD -- ':!firefly.diff' > firefly.diff
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout -b "generate-diff-$(date +'%Y-%m-%d')"
git add firefly.diff
git commit -m "Generated diff for $(date +'%Y-%m-%d')"
git push origin "generate-diff-$(date +'%Y-%m-%d')"
gh pr create --title "Generated diff for $(date +'%Y-%m-%d')" --body "This PR contains the generated diff." --base develop