Skip to content

Commit 93b5aef

Browse files
authored
Merge pull request #2 from baschny/fix-permissions
Fix permissions: call php using the same github actions uid (1001)
2 parents dafeda5 + 423294c commit 93b5aef

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

action.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ runs:
5858
echo "::set-output name=composer_major_version::${DETECTED_MAJOR_VERSION}"
5959
echo "::set-output name=composer_version::${DETECTED_VERSION}"
6060
61+
COMPOSER_DOCKER="docker run --rm --user 1001 --volume ${RUNNER_WORKSPACE}/composer:/tmp --volume ${GITHUB_WORKSPACE}:/app -w /app composer:${COMPOSER_VERSION}"
6162
if [ "$GITHUB_OAUTH" ]; then
62-
docker run --rm --volume ${RUNNER_WORKSPACE}/composer:/tmp \
63-
composer:${COMPOSER_VERSION} config -g github-oauth.github.com $GITHUB_OAUTH
63+
$COMPOSER_DOCKER config -g github-oauth.github.com $GITHUB_OAUTH
6464
fi
6565
6666
case "${COMPOSER_COMMAND}" in
@@ -70,11 +70,7 @@ runs:
7070
7171
*)
7272
echo "Running composer v${DETECTED_VERSION} with: $COMPOSER_COMMAND $COMPOSER_ARGS"
73-
docker run --rm \
74-
--volume ${RUNNER_WORKSPACE}/composer:/tmp \
75-
--volume ${GITHUB_WORKSPACE}:/app \
76-
-w /app \
77-
composer:${COMPOSER_VERSION} $COMPOSER_COMMAND $COMPOSER_ARGS
73+
$COMPOSER_DOCKER $COMPOSER_COMMAND $COMPOSER_ARGS
7874
;;
7975
esac
8076

0 commit comments

Comments
 (0)