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

Allow templating of galaxy.yml file for version key #49

Closed
geerlingguy opened this issue Apr 2, 2020 · 4 comments · Fixed by #52
Closed

Allow templating of galaxy.yml file for version key #49

geerlingguy opened this issue Apr 2, 2020 · 4 comments · Fixed by #52
Assignees
Labels
enhancement New feature or request

Comments

@geerlingguy
Copy link

I've been working on publishing collections on git tags from GitHub automatically, and have it set up for some of my personal collections, but have had to hold of on doing it for other collections like community.kubernetes (see ansible-collections/community.kubernetes#43) because the Galaxy token is global to my account, and anyone who could get some code into the Kubernetes collection could technically push to any project I have rights to in Galaxy.

However, in my personal collections, I also use a templated galaxy.yml file which lets me inject a version at build time (so I don't have to commit the version to GitHub, then tag it, then release it). Is there any way this action could support injecting a tag, e.g. when GitHub Actions runs, it grabs the tag (if it's a tag build), templates it into galaxy.yml, then runs the build and pushes the artifact?

@artis3n
Copy link
Owner

artis3n commented Apr 2, 2020

That's a great idea, I'll work on this over the weekend

@artis3n
Copy link
Owner

artis3n commented Apr 5, 2020

Made some significant refactors and completed #17 which puts me in a good place to get this done tomorrow. I'll link the PR to this issue. Will be validating semver-compliant input with https://github.com/npm/node-semver.

galaxy_version

Semver-compatible string: 1 / 1.1 / 1.1.1 / 1.1.1-alpha.

Dynamically inject a semver-compatible version into your galaxy_config_file.

@artis3n
Copy link
Owner

artis3n commented Apr 5, 2020

v2.2.0 was released with a galaxy_version input parameter. Let me know if there's functionality you see still missing. I created #53 to add some additional functionality on top of this in the future.

@artis3n
Copy link
Owner

artis3n commented Apr 11, 2020

You should minimally use v2.2.1 for this - see #55 where I encounter what seems to be a bug in GitHub Actions' runner's implementation of the default WORKDIR when building the image in a workflow run. The short summary is v2.2.0 won't run but v2.2.1 will.

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

Successfully merging a pull request may close this issue.

2 participants