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

[Feature] since_last_passing_remote_commit #507

Closed
2 tasks done
Archie-Elvie opened this issue May 30, 2022 · 4 comments · Fixed by #510
Closed
2 tasks done

[Feature] since_last_passing_remote_commit #507

Archie-Elvie opened this issue May 30, 2022 · 4 comments · Fixed by #510
Labels
enhancement New feature or request

Comments

@Archie-Elvie
Copy link

Archie-Elvie commented May 30, 2022

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

I'm currently using this action to detect changes to our dockerfile that we use for dev and our CI/CD pipeline. Currently it will rebuild our image and upload it to the registry if the dockerfile has changed since last remote commit. However, if the workflow fails before the build can be uploaded, this change in dockerfile is not captured. Therefore the next remote commit that might fix the failed workflow might not have a dockerfile change and therefore the image rebuild will not take place and an old image will be used for testing.

Describe the solution you'd like?

A way to check if a file has been modified since the last passing remote commit. This should fix the issue stated above. Passing in this context is passing all enabled workflow checks.

Describe alternatives you've considered?

Current solution is a rule that disallows editing the workflows and dockerfile in the same remote commit, however other issues could arise (such as server failure) that this would not capture.

Anything else?

If anyone has a workaround for this that would work with the current version, that would be great. Let me know if you have any questions.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Archie-Elvie Archie-Elvie added the enhancement New feature or request label May 30, 2022
@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience.

@jackton1 jackton1 linked a pull request May 31, 2022 that will close this issue
@jackton1
Copy link
Member

jackton1 commented May 31, 2022

@Archie-Elvie I’ve updated the README highlighting the solution to solving this problem.

@Archie-Elvie
Copy link
Author

@jackton1 That works great, thank you. Out of interest is there a reason to use tj-actions/branch-names@v5 instead of ${{ github.ref_name }}?

@jackton1
Copy link
Member

jackton1 commented May 31, 2022

@Archie-Elvie From my test it doesn't appear that ${{ github.ref_name }} is going to return a valid branch name always which is why tj-actions/branch-names@v5 is recommended.

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