Code Monkey home page Code Monkey logo

Comments (3)

dmitry-shibanov avatar dmitry-shibanov commented on June 28, 2024

Hello @codecholeric. If I understood well you want to see result from core.setOutput for setup-java step. For this you can use this snippet:

    - uses: actions/setup-java@v1
      id: setupJava
      with:
        java-version: 8.x

    - run: echo "${{ toJson(steps.setupJava.outputs) }}"
      shell: bash

About the issue with two env variables for JAVA_HOME we're planing to remove variant with dots for setup-java@v2:

core.exportVariable(extendedJavaHome, toolPath); //TODO: remove for v2
// For portability reasons environment variables should only consist of
// uppercase letters, digits, and the underscore. Therefore we convert
// the extendedJavaHome variable to upper case and replace '.' symbols and
// any other non-alphanumeric characters with an underscore.
extendedJavaHome = extendedJavaHome.toUpperCase().replace(/[^0-9A-Z_]/g, '_');

from setup-java.

codecholeric avatar codecholeric commented on June 28, 2024

@dmitry-shibanov thanks for the info 😃 I see that the output path works as expected now! (I don't know why it hasn't when I opened the issue, because I printed steps.setupJava and nothing showed, when I run the same action now, I see

steps.setupJava:\ {
  outputs: {
    path: /opt/hostedtoolcache/jdk/9.0.7/x64,
    version: 9.0.7
  },
  outcome: success,
  conclusion: success
}

So exactly as I would expect 😄 That means I can probably simplify this beauty here now 😂 https://github.com/TNG/ArchUnit/blob/master/.github/workflows/build.yml#L57

from setup-java.

codecholeric avatar codecholeric commented on June 28, 2024

Gonna close this issue then. I think it's great to drop the env vars with dots 👍

from setup-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.