setup-java: Java-version is not specified on self-hosted but ok on github-runner

Description: I use the following settings in my workflow:

...
jobs:
  job-name:
    runs-on: [self-hosted]
    container:
      image: ubuntu:20.04
...
      - uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'zulu'
          java-package: jdk+fx
          cache: gradle
...

It works fine on GitHub-hosted runners but fails on clear Ubuntu 20.04/22.04 installation with error:

Error: Input required and not supplied: java-version

I’m ready to provide additional debug from worker logs but id doesn’t contain useful information. Advice please how get additional debugging information. Maybe there is an option to run action manually inside docker container

Task version: v2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

  1. Install Ubuntu official distribution on Hyper-V virtual machine (check Docker as additional option to be installed)
  2. Install runner according to official article and run as a service.

Expected behavior: Java installed

Actual behavior: Workflow crashed

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

Documentation contribution is here https://github.com/github/docs/pull/19309

@bissquit i’ll move the issue to the Waiting for rollout state because there’s nothing to do with it anymore and i will close it as soon as the documentation change will have been either approved or denied. But please feel free to create new issue or reopen this one in case if the problem not solved. Thanks for the cooperation.