Skip to content
New issue

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

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

Already on GitHub? # to your account

[FR] Support updating used action references within composite actions #6

Open
webknjaz opened this issue Sep 19, 2024 · 1 comment
Open

Comments

@webknjaz
Copy link

So the composite actions are pretty simple. They have a steps key that pretty much resembles the job steps key in workflow definitions: https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action#creating-an-action-metadata-file

These actions can be in their own repos (like other distributable action types) and have a file called action.yml in repo roots.

There's also an unofficial convention to have local in-repo actions in subdirectories of .github/actions/, with their own action.yml files. I think it's technically possible to put these anywhere so it might make sense to have some configuration for such action paths. Perhaps, those local actions referenced from the workflow definitions could be auto-discovered.

I imagine one would need to extend https://github.com/davidism/gha-update/blob/b752b98/src/gha_update/_core.py#L48-L53 to handle this case.

@edgarrmondragon
Copy link

Just ran into this. Maybe a configurable composite_actions_paths with [".github/actions/"] as default?

# pyproject.toml
[tool.gha-update]
composite_actions_paths = [".github/actions/", "another/location"]

or like @webknjaz mentioned, composite actions could be auto-discovered in

if not uses or uses.startswith("./") or uses.startswith("docker://"):
instead of ignored. Though I think there are a lot of edge cases, like directory trees that are checked out but don't exist locally, etc.

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

No branches or pull requests

2 participants