name: JDK

on:
  push:
    paths:
    - '.github/workflows/jdks.yml'
    - 'install-jdk.sh'

jobs:
  jdk-ea:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - run: source install-jdk.sh --dry-run
  jdk-5:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - run: source install-jdk.sh --url 'http://igm.univ-mlv.fr/~forax/tmp/jdk/jdk1.5.0_22.tar.gz'
    - run: java -version

name: JDK

on:
  push:
    paths:
    - '.github/workflows/jdks.yml'
    - 'install-jdk.sh'

jobs:
  jdk-ea:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - run: source install-jdk.sh --dry-run
  jdk-5:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - run: source install-jdk.sh --url 'http://igm.univ-mlv.fr/~forax/tmp/jdk/jdk1.5.0_22.tar.gz'
  jdk-5-gh:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-java@v1
      with:
        java-version: '1.5.0'
        architecture: x64
        jdkFile: 'http://igm.univ-mlv.fr/~forax/tmp/jdk/jdk1.5.0_22.tar.gz'
    - run: java -version

Use setup-action to install JDK 5
Use setup-action to install JDK 5