Skip to content

CI Docker diffs - use env.MATCHED_FILES#777

Merged
ewels merged 1 commit into
nf-core:devfrom
ewels:ci-docker-diff
Nov 18, 2020
Merged

CI Docker diffs - use env.MATCHED_FILES#777
ewels merged 1 commit into
nf-core:devfrom
ewels:ci-docker-diff

Conversation

@ewels

@ewels ewels commented Nov 18, 2020

Copy link
Copy Markdown
Member

In #774 @KevinMenden updated the technote-space/get-diff-action so 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_DIFF to env.MATCHED_FILES. This then returns true if any of the files listed under FILES have been changed. env.GIT_DIFF now basically always returns true, so currently the Docker image always builds.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

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
@ewels ewels added bug Something isn't working high-priority labels Nov 18, 2020
@ewels

ewels commented Nov 18, 2020

Copy link
Copy Markdown
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.

@KevinMenden

Copy link
Copy Markdown
Contributor

Oh ... that's stupid. Thanks for that!
Pretty confusing - sorry for missing that!

@ewels

ewels commented Nov 18, 2020

Copy link
Copy Markdown
Member Author

Confirmed - works as expected: https://github.com/nf-core/methylseq/pull/177/checks?check_run_id=1418132127

@ewels

ewels commented Nov 18, 2020

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Contributor

Yes true, still ... no excuses :) But at least you catched it before all pipelines make the update :)

@KevinMenden KevinMenden mentioned this pull request Nov 18, 2020
5 tasks
@ewels ewels merged commit 6840e0f into nf-core:dev Nov 18, 2020
@ewels ewels deleted the ci-docker-diff branch November 18, 2020 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working high-priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants