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 filtering by job id #11

Merged
merged 9 commits into from
Sep 23, 2024
Merged

Conversation

iamnafets
Copy link
Contributor

Some workflows you may want to filter by the last workflow with a specifically-named successful job. This PR adds an additional parameter to do this.

@domi2120
Copy link
Contributor

@iamnafets I've reviewed the changes and noticed the change to the behaviour if no matching run has been found. Previously the current SHA was returned, but with this PR the earliest SHA will be returned instead. Is there a specific reason for this change?

@VeoVirt
Copy link

VeoVirt commented Jul 9, 2024

+1 for this PR to be approved, you should not use the triggeringSHA if you cannot find a successful run. A good use-case for this action is that you can use it for checking if a scheduled build can be skipped when the sha has been built before. It currently breaks on the first build of a workflow or if all builds in a workflow has failed, then the github.sha and last-succesful-build.outputs.sha will always be equal. Also the name "last-successful-build" is misleading since it can return the triggering sha even though it does not correspond to a succesful build.

Copy link
Contributor

@gabbersepp gabbersepp left a comment

Choose a reason for hiding this comment

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

I will merge the PR but add another option to control what should be done when no build was found. I was not able to determine of the changed behaviour will break no existing behaviour in our builds.

@gabbersepp gabbersepp merged commit 4aa8b52 into SamhammerAG:master Sep 23, 2024
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.

4 participants