Skip to content

openjdk

openjdk #115

Workflow file for this run

name: openjdk
on:
schedule:
- cron: "47 3 * * *"
push:
branches:
- main
paths:
- .github/workflows/openjdk.yml
workflow_dispatch:
concurrency:
group: openjdk
jobs:
fetch:
name: Fetch
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq
- name: Fetch
id: fetch
run: |
MAJOR_VERSION="$(
curl --silent --show-error --location --fail \
--url "https://api.adoptium.net/v3/info/available_releases" \
| jq --raw-output '.available_releases | max'
)"
echo "### Found major version ${MAJOR_VERSION}"
VERSION="$(
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/adoptium/temurin${MAJOR_VERSION}-binaries/releases/latest" \
| jq --raw-output '.tag_name' \
| sed 's/^jdk-//' \
| sed -E 's/^([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)\+([[:digit:]]+)$/\1-\2/'
)"
echo "### Found version ${VERSION}"
echo "version=${VERSION}" >>${GITHUB_OUTPUT}
- name: Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
allowUpdates: true
name: "openjdk v${{ steps.fetch.outputs.version }}"
tag: openjdk/${{ steps.fetch.outputs.version }}
draft: false
prerelease: false