-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 2.41 KB
/
update-java.yml
File metadata and controls
68 lines (66 loc) · 2.41 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
# SPDX-FileCopyrightText: Copyright © 2024 - 2025 Caleb Cushing
#
# SPDX-License-Identifier: CC0-1.0
name: update-java
on:
schedule:
- cron: "0 3 * * *"
push:
branches:
- ci/auto-update-java
- ci/auto-update
jobs:
update-java:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
packages: read
env:
ORG_GRADLE_PROJECT_ghUsername: ${{ secrets.GITHUB_ACTOR }}
ORG_GRADLE_PROJECT_ghPassword: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6.0.2
with:
ref: ${{ github.ref }}
filter: "blob:none"
fetch-depth: 0
- uses: actions/setup-java@v5.2.0
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v5.0.2
with:
gradle-version: current
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- run: gradle wrapper --write-locks
- run: make ci-update-java
- run: |
echo "stdout<<EOF" >> $GITHUB_OUTPUT
git status --porcelain=1 | tee --append $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
name: git status
id: git_status
- uses: actions/setup-python@v6.2.0
with:
python-version: "3"
if: ${{ contains(steps.git_status.outputs.stdout, 'gradle/wrapper/') }}
- run: pip install -r requirements.txt
if: ${{ contains(steps.git_status.outputs.stdout, 'gradle/wrapper/') }}
- run: |
reuse annotate --license 'Apache-2.0' --copyright 'Gradle, Inc' \
--copyright-prefix spdx-string-symbol --merge-copyrights --force-dot-license gradle/wrapper/gradle-wrapper.jar
reuse annotate --license 'CC0-1.0' --copyright 'Caleb Cushing' \
--copyright-prefix spdx-string-symbol --merge-copyrights --force-dot-license gradle/wrapper/gradle-wrapper.properties
name: reuse
if: ${{ contains(steps.git_status.outputs.stdout, 'gradle-wrapper.jar') }}
- uses: peter-evans/create-pull-request@v8.1.0
id: create_pr
with:
title: "chore(deps): java"
branch: deps/update-java
token: ${{ secrets.GH_MERGE_PAT }}
- run: gh pr merge --auto --squash ${{ steps.create_pr.outputs.pull-request-number }}
if: ${{ steps.create_pr.outputs.pull-request-number != '' }}
env:
GH_TOKEN: ${{ secrets.GH_MERGE_PAT }}