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

✨ Get version from dagger.json #138

Open
jsok opened this issue Jul 22, 2024 · 6 comments
Open

✨ Get version from dagger.json #138

jsok opened this issue Jul 22, 2024 · 6 comments

Comments

@jsok
Copy link

jsok commented Jul 22, 2024

What are you trying to do?

In order to keep the Dagger version used in GitHub Actions the same as the engine version used, it would be nice to be able to supply a path to a dagger.json file and have the engine version parsed from it and used.

This behaviour would be similar to the setup-go action which can get the Go version from a go.mod file: https://github.com/actions/setup-go?tab=readme-ov-file#getting-go-version-from-the-gomod-file.

Example

uses: dagger/dagger-for-github@v5
with:
  verb: call
  args: something
  version-file: path/to/dagger.json

Why is this important to you?

This will simplify the process of upgrading Dagger.

How are you currently working around this?

Updating Dagger requires updating the version number in multiple places (dagger.json and every GitHub workflow YAML file which uses this action).

@sagikazarmark
Copy link

Note: this only works if you check out the code first (which isn't a requirement).

@Vad1mo
Copy link

Vad1mo commented Oct 26, 2024

I wanted to open up the same feature request. Makes sense to improve the UX, event if it won't be applicable in all cases.

@sagikazarmark
Copy link

I've put something together: https://github.com/marketplace/actions/dagger-version

See it in action: openmeterio/openmeter#1753

@Vad1mo
Copy link

Vad1mo commented Oct 26, 2024

As I understand dagger-for-github does not support it directly but via another actions/dagger-version it works!

@sagikazarmark
Copy link

Correct

@Vad1mo
Copy link

Vad1mo commented Oct 26, 2024

Thanks, tried it out now, and it looks good → goharbor/harbor-cli#222

IMO this issue can be closed as a good alternative exists.

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