-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (37 loc) · 1.25 KB
/
make_patch.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
name: Make Patch
on:
pull_request:
branches:
- master
permissions:
issues: write
jobs:
make_patch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create diff
run: |
mkdir -p .github/patch_data
git fetch origin
git diff origin/${{ github.base_ref }} -- . ':!.github' ':!patch' > .github/patch_data/unified_diff.patch
cp patch/*.qml patch/*.png patch/*.js patch/*.svg patch/*.qm .github/patch_data |:
- name: Upload build result
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
name: ${{ github.head_ref }}
path: .github/patch_data
- name: View context attributes
uses: actions/github-script@v7
with:
script: console.log(context)
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Hello @${{ github.event.pull_request.user.login }}\nYour patch is ready!\n\n[Download link](${{ steps.artifact-upload-step.outputs.artifact-url }})'
})