mirror of
https://github.com/actions/setup-java.git
synced 2026-11-19 03:49:09 +00:00
Add daily latest JDK versions report workflow (#1329)
* Add daily latest JDK versions report workflow Add a scheduled workflow that resolves, without downloading, the exact version each distribution currently provides for the LTS majors, the newest feature release, and `latest` on Linux, macOS, and Windows for x64 and aarch64. Resolution reuses each installer's metadata lookup, so the report matches what setup-java installs on a tool-cache miss or with `check-latest: true`. Results are combined into a job summary with a per-platform breakdown and a section for distributions needing attention. Link the report from the README. Co-authored-by: Copilot App <[email protected]> * Report every supported platform in latest JDK versions report Resolve each distribution on every OS and architecture in the capability map, including Alpine Linux, and render a full per-platform table for each distribution instead of a merged overview. Platform differences are expected and no longer flagged; only lookup errors and distributions that resolve nothing are listed under "Needs attention". Share HEAD responses per distribution so JetBrains lookups no longer re-probe every release URL, cutting a Linux run from ~7 min to ~1 min. Co-authored-by: Copilot App <[email protected]> * Complete JDK report platform and major coverage Resolve every major from Java 6 through the newest GA release, including non-LTS versions. Query Liberica Solaris metadata through its installer and include Solaris in the workflow matrix. Preserve exact per-platform versions without flagging normal differences. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot App <[email protected]>
This commit is contained in:
1 parent
3c7a629527
commit
3fc1c6e612
6 files changed
+1226
-1
No files matched your search
@@ -0,0 +1,157 @@
|
||||
# Daily report of the exact JDK version each distribution currently resolves
|
||||
# for every major from Java 6 through the newest GA release, and `latest`, on every operating
|
||||
# system and architecture setup-java supports for it. Versions are resolved
|
||||
# from vendor metadata only; no JDK is downloaded.
|
||||
name: Latest JDK versions report
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 6 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
java-versions:
|
||||
description: 'Comma-separated java-version values (default: every major from Java 6 through the newest GA release, and latest)'
|
||||
required: false
|
||||
default: ''
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/reports/**'
|
||||
- '.github/workflows/latest-jdk-versions.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build report tool
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24.x'
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Bundle report tool
|
||||
run: npm run build:latest-versions-report
|
||||
- name: Upload report tool
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: latest-versions-report-tool
|
||||
path: lib/latest-versions-report/
|
||||
retention-days: 1
|
||||
|
||||
resolve:
|
||||
name: Resolve versions (${{ matrix.platform }})
|
||||
needs: build
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
- os: macos-latest
|
||||
platform: macos
|
||||
- os: windows-latest
|
||||
platform: windows
|
||||
# Liberica's Solaris metadata is queried without running a Solaris JDK.
|
||||
- os: ubuntu-latest
|
||||
platform: solaris
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24.x'
|
||||
- name: Download report tool
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: latest-versions-report-tool
|
||||
path: tool
|
||||
- name: Resolve latest versions without downloading
|
||||
run: node tool/index.js resolve "results/$REPORT_PLATFORM.json"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
REPORT_VERSIONS: ${{ inputs.java-versions }}
|
||||
REPORT_PLATFORM: ${{ matrix.platform }}
|
||||
- name: Upload resolved versions
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: latest-jdk-versions-${{ matrix.platform }}
|
||||
path: results/
|
||||
retention-days: 1
|
||||
|
||||
# Installers pick musl builds on Alpine, which can resolve to other versions.
|
||||
resolve-alpine:
|
||||
name: Resolve versions (alpine)
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
container:
|
||||
image: node:24-alpine
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- name: Download report tool
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: latest-versions-report-tool
|
||||
path: tool
|
||||
- name: Resolve latest versions without downloading
|
||||
run: node tool/index.js resolve results/alpine.json
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
REPORT_VERSIONS: ${{ inputs.java-versions }}
|
||||
- name: Upload resolved versions
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: latest-jdk-versions-alpine
|
||||
path: results/
|
||||
retention-days: 1
|
||||
|
||||
report:
|
||||
name: Report
|
||||
needs: [build, resolve, resolve-alpine]
|
||||
if: ${{ !cancelled() && needs.build.result == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24.x'
|
||||
- name: Download report tool
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: latest-versions-report-tool
|
||||
path: tool
|
||||
- name: Download resolved versions
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: latest-jdk-versions-*
|
||||
path: results
|
||||
merge-multiple: true
|
||||
- name: Write report
|
||||
run: node tool/index.js summarize results latest-jdk-versions.md
|
||||
- name: Upload report
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: latest-jdk-versions-report
|
||||
path: |
|
||||
latest-jdk-versions.md
|
||||
results/
|
||||
retention-days: 30
|
||||
Reference in new issue
Block a user