Skip to main content

Setting up JDK in GitHub Actions

· One min read
Jiaqi Liu

Installing JDK 17

The standard actions/setup-java requires us to specify JDK distributions other than JDK version. Looking up JDK distributions wastes user's time and gives opportunities to error.

We offer a no-config action that installs JDK 17 by default. The usage is as follows:

name: CI/CD

"on":
pull_request:
push:
branches:
- master

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Set up JDK
uses: QubitPi/hashicorp-aws/.github/actions/jdk-setup@master