Skip to content

Commit

Permalink
CI Docker diffs - use env.MATCHED_FILES
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ewels committed Nov 18, 2020
1 parent f7536e4 commit 7d339cc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
environment.yml
- name: Build new docker image
if: env.GIT_DIFF
if: env.MATCHED_FILES
run: docker build --no-cache . -t {{ cookiecutter.name_docker }}:dev

- name: Pull docker image
if: {% raw %}${{ !env.GIT_DIFF }}{% endraw %}
if: {% raw %}${{ !env.MATCHED_FILES }}{% endraw %}
run: |
docker pull {{ cookiecutter.name_docker }}:dev
docker tag {{ cookiecutter.name_docker }}:dev {{ cookiecutter.name_docker }}:dev
Expand Down

0 comments on commit 7d339cc

Please sign in to comment.