Repository navigation
81 lines (68 loc) · 3.15 KB
/
Copy pathcreate-pr.yml
File metadata and controls
81 lines (68 loc) · 3.15 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Update summary (for master branch)
on:
push:
branches:
- master
paths:
- 'src/main/kotlin/tsuki/**'
env:
SIGNER_USERNAME: YakaBot
SIGNER_EMAIL: yakateam@proton.me
permissions:
contents: write
pull-requests: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository 🌏
uses: actions/checkout@900f2210b1d28bbbd0bd22d17926b9e224e8f231 # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Java environment 🔧
uses: actions/setup-java@b622de1dfa918ecc0ab28f40cd42e3c3752cd6c5 # v5.2.0
with:
# Gradle 9+ requires JVM 17 to run; compile target remains JVM 11 via jvmToolchain(11)
java-version: '17'
distribution: 'temurin'
- name: Set up Gradle environment 📦
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
with:
gradle-version: '9.1.0'
- name: Run ksp tasks 🚀
run: ./gradlew kspKotlin --rerun-tasks
continue-on-error: true
- name: Check summary changes 📤
id: summary_check
run: |
if git status --porcelain .github/summary.yaml | grep .; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Commit summary change 📦
if: steps.summary_check.outputs.changed == 'true'
run: |
git config user.name "${{ env.SIGNER_USERNAME }}"
git config user.email "${{ env.SIGNER_EMAIL }}"
git checkout -b auto/update
git add .github/summary.yaml
git commit -m "chore: Update summary after compiling the library"
- name: Create Pull Request 🚀
if: steps.summary_check.outputs.changed == 'true'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: auto/update
title: "chore(actions): Update summary after building this library"
body: |
> [!IMPORTANT]
> There may be an issue with how the number of available sources for this library is currently counted
>
> Please review the summary if anything looks incorrect.
🔄 Triggered after library build workflow completes
🤖 Generated automatically via [GitHub Actions](https://github.com/features/actions)
base: master