Skip to content

Commit 087d8ab

Browse files
authored
Merge pull request #36 from m-herold/annotations
Fix GitHub annotation for using WORKING_DIRECTORY environment variable
2 parents c5cb516 + 0288486 commit 087d8ab

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/docker-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ jobs:
6363
shell: bash
6464

6565
- name: Output on Warnings with WORKING_DIRECTORY environment variable
66-
run: diff <(docker run -v $(pwd):$(pwd) -w $(pwd) --rm --env WORKING_DIRECTORY=Warnings action-swiftlint|sort) Warnings/expected.txt
66+
run: diff <(docker run -v $(pwd):$(pwd) -w $(pwd) --rm --env WORKING_DIRECTORY=Warnings action-swiftlint|sort) <(cat Warnings/expected.txt | sed -E 's/^(.*)file=(.*),(.*)/\1file=Warnings\/\2,\3/')
6767
working-directory: ./test
6868
shell: bash

entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands
55

66
function stripPWD() {
7+
if ! ${WORKING_DIRECTORY+false};
8+
then
9+
cd - > /dev/null
10+
fi
711
sed -E "s/$(pwd|sed 's/\//\\\//g')\///"
812
}
913

0 commit comments

Comments
 (0)