Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read sdks from .sdkmanrc #13

Closed
breucode opened this issue May 7, 2022 · 9 comments
Closed

Read sdks from .sdkmanrc #13

breucode opened this issue May 7, 2022 · 9 comments

Comments

@breucode
Copy link

breucode commented May 7, 2022

Instead of specifying the sdks in the workflow itself it would be nice to read the sdks from the .sdkmanrc file

@eddumelendez
Copy link
Member

See #11

@fnobilia
Copy link

I've tried out #11, but I get this error

Run sdkman/sdkman-action@master
Run candidate=
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1149  100  1149    0     0   [48](https://github.com/fnobilia/serverless-slack-bot/actions/runs/4702791134/jobs/8340481096#step:3:50)66      0 --:--:-- --:--:-- --:--:--  4868
hook_post__.sh: line 1: syntax error near unexpected token `newline'
Error: Process completed with exit code 2.

my .sdkmanrc is

java=22.1.0.r17-grl
gradle=7.5

and my github workflow is

name: build

on: push

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - name: Checkout project sources
        uses: actions/checkout@v3
      - name: Set up SDK
        uses: sdkman/sdkman-action@master
        id: sdkman
      - name: Show Java version
        run: java -version
      - name: Setup Gradle
        uses: gradle/gradle-build-action@v2
      - name: Run build with Gradle Wrapper
        run: ./gradlew build

Any suggestion?

@eddumelendez
Copy link
Member

did you try with main branch? I did some changes in order to make it work properly

@fnobilia
Copy link

Is 'sdkman/sdkman-action@master' main?

@eddumelendez
Copy link
Member

no, master is still there for backward compatibility. There is a new main branch which you can test but hopefully soon I will release it in the marketplace

@fnobilia
Copy link

fnobilia commented Apr 14, 2023

How can I change my workflow to point the action to your main? I've never done it before! 🙃
BTW, thx for your help! 🙂

@eddumelendez
Copy link
Member

sdkman/sdkman-action@main instead of sdkman/sdkman-action@master

@fnobilia
Copy link

It worked! Thx for your help! You may want to change this line in the README.md 🙃

@eddumelendez
Copy link
Member

I'm planning to update the version once it is released in the marketplace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants