Skip to content

Commit

Permalink
Fix docker not working in real action
Browse files Browse the repository at this point in the history
  • Loading branch information
bbugh committed Nov 22, 2019
1 parent 87119bb commit b28dabf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ LABEL com.github.actions.description="Check your code for `FIXME` labels"
LABEL com.github.actions.icon="code"
LABEL com.github.actions.color="yellow"

ENTRYPOINT ["lib/entrypoint.sh"]
COPY lib/entrypoint.sh /entrypoint.sh
COPY lib/git-grep-problem-matcher.json /git-grep-problem-matcher.json
ENTRYPOINT ["/entrypoint.sh"]
8 changes: 7 additions & 1 deletion lib/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

set -e

echo "::add-matcher::lib/git-grep-problem-matcher.json"
# With problem matchers in a container, the matcher config MUST be available
# outside the container on the VM so we will just copy it into the workspace.
# See: https://github.com/actions/toolkit/issues/205#issuecomment-557647948
matcher_path=`pwd`/git-grep-problem-matcher.json
cp /git-grep-problem-matcher.json "$matcher_path"

echo "::add-matcher::git-grep-problem-matcher.json"

tag="FIXME"
result=$(git grep --no-color -n -e "${tag}:")
Expand Down

0 comments on commit b28dabf

Please sign in to comment.