actions icon indicating copy to clipboard operation
actions copied to clipboard

🐞 Actions doesn't see gradle with version 8.10

Open ylazakovich opened this issue 1 year ago • 3 comments

     - name: Set up JDK
        uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4
        with:
          distribution: "corretto"
          cache: "gradle"
          java-version: "17"
      - name: Build with Gradle
        uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4
        with:
          gradle-version: 8.10

As result uses gradle of version 8.1 instead of 8.10 image

ylazakovich avatar Aug 14 '24 20:08 ylazakovich

This is likely a YAML gotcha: it's interpreted by the YAML parser as a number, you'd want to quote it so it's taken as a string.

tbroyer avatar Aug 14 '24 20:08 tbroyer

Confirm, you are right

Thanks @tbroyer! I think issue is not relevant and can be closed

image

ylazakovich avatar Aug 14 '24 20:08 ylazakovich

Thanks for the report, and thanks @tbroyer for the diagnosis. Before closing this I'll see if there's any way for the action to influence the way the gradle-version input is interpreted, but I suspect there's not much the action can do.

bigdaz avatar Aug 15 '24 01:08 bigdaz

This value is converted by YAML before the action has any chance to do anything. I'll update our docs to quote the Gradle version, but I don't think there's much else that can be done.

bigdaz avatar Aug 26 '24 17:08 bigdaz