Skip to content

Commit

Permalink
Added openjdk
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Sep 18, 2024
1 parent f2e87de commit 87e3ab7
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/openjdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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-22.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'
)"
VERSION="$(
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/adoptium/temurin${MAJOR_VERSION}-binaries/releases" \
| jq --raw-output '.tag_name'
)"
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

0 comments on commit 87e3ab7

Please sign in to comment.