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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the action output a versioning element so it could be used as part of the cache restore key #239

Merged
merged 4 commits into from Jan 12, 2024

Conversation

paulo-ferraz-oliveira
Copy link
Collaborator

@paulo-ferraz-oliveira paulo-ferraz-oliveira commented Jan 11, 2024

Description

We implement auto-versioning (from the main branch) as a way to have an action output variable which is the commit unique id of the action version being executed, and also document this.

Since this implies a change to the main branch, directly, and there's no easier way to do it, we'd have to change

image

(which I already did, so needs to be reverted if we don't wanna move forward 馃槃)

These (changes to the settings) do not represent explicit security issues, only potential maintenance issues, in which we'd merge something that didn't pass CI. In any case, I'm "pretty sure" that before releasing, and especially at pr time, we validate the workflow results and ask pr'ers to act on those, so it shouldn't be a big deal. Lemme know...

Otherwise, if you have other ideas (I'd hate to have to approve a pull request for this everytime we merge to the main branch or, even worse, have to maintain the version by hand), I'm all ears...

Closes #222.

Other considerations

There's a bit of linting and clean up involved, also.

And finally, I tested the changes and the flow in my own action branch, so it should be working as-is.

By providing an output with the action version we ease
cache invalidation on consumer, due to the fact we can
now stop worrying about changes to the action's cache itself

Might also be interesting for self-hosted runners...
Copy link
Member

@starbelly starbelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@starbelly starbelly merged commit 4678b57 into main Jan 12, 2024
120 checks passed
@paulo-ferraz-oliveira paulo-ferraz-oliveira deleted the feature/sha-as-output branch January 13, 2024 18:26
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

Successfully merging this pull request may close these issues.

Have the action output a versioning element so it could be used as part of the cache restore key
2 participants