Skip to content

Commit

Permalink
hack: mount docker config on gha
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Oct 3, 2024
1 parent ca72046 commit 8edb942
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hack/test
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ if [ "$TEST_KEEP_CACHE" != "1" ]; then
trap 'docker rm -v $cacheVolume' EXIT
fi

baseCreateFlags="--rm --privileged \
dockerConfigMount=""
if [ "$GITHUB_ACTIONS" = "true" ]; then
dockerConfigPath="$HOME/.docker/config.json"
if [ -f "$dockerConfigPath" ]; then
dockerConfigMount="-v $dockerConfigPath:/root/.docker/config.json:ro"
fi
fi

baseCreateFlags="--rm --privileged $dockerConfigMount \
-v /tmp $testReportsVol \
--volumes-from=$cacheVolume \
-e CGO_ENABLED \
Expand Down

0 comments on commit 8edb942

Please sign in to comment.