-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.23 KB
/
update-java-status.yml
File metadata and controls
46 lines (38 loc) · 1.23 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
name: Update Java Download Status
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch: # Allow manual triggering
# Needed for dependency-submission-action
permissions:
contents: write
jobs:
update-status:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install dependencies
run: |
mvn install -DskipTests
- name: Run Java Version Checker
run: |
cd scr
java -jar target/java-version-checker-jar-with-dependencies.jar > ../java_status.json
- name: Update README files
run: |
cd scr
java -jar target/readme-updater-jar-with-dependencies.jar
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "Update Java download status"
git push