CI Docker diffs - use env.MATCHED_FILES#777
Merged
Merged
Conversation
With update to GitHub Actions technote-space/get-diff-action, we need to use env.MATCHED_FILES instead of env.GIT_DIFF to see if any of the files listed under FILES have been changed. env.GIT_DIFF basically always returns true, so currently the Docker image always builds. Docs: https://github.com/marketplace/actions/get-diff-action#examples-of-env Original PR: nf-core#774
Member
Author
|
Docker build is now skipped with this change: https://github.com/nf-core/methylseq/pull/177/checks?check_run_id=1418109043 ✅ Haven't yet checked to confirm that the Docker image builds when it should be doing. I might try touching some whitespace in one of those files in the above PR to check that it does rebuild. |
Contributor
|
Oh ... that's stupid. Thanks for that! |
Member
Author
|
Confirmed - works as expected: https://github.com/nf-core/methylseq/pull/177/checks?check_run_id=1418132127 |
Member
Author
|
No worries! It's an easy one to miss as the action works nicely. Just doesn't quite do what we want it to do 😅 |
KevinMenden
approved these changes
Nov 18, 2020
Contributor
|
Yes true, still ... no excuses :) But at least you catched it before all pipelines make the update :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #774 @KevinMenden updated the
technote-space/get-diff-actionso that GitHub Actions runs with the new security settings rolled out by GitHub.This fixed the GitHub Actions and got things running again. However, I noticed in nf-core/methylseq#177 that when I copied over the changes, the Docker image was building even though I hadn't touched any of the listed files.
I had a look over the docs for the action and I think that we need to switch
env.GIT_DIFFtoenv.MATCHED_FILES. This then returns true if any of the files listed underFILEShave been changed.env.GIT_DIFFnow basically always returns true, so currently the Docker image always builds.PR checklist
CHANGELOG.mdis updateddocsis updated