Skip to content

Commit

Permalink
Merge pull request #2 from baschny/fix-permissions
Browse files Browse the repository at this point in the history
Fix permissions: call php using the same github actions uid (1001)
  • Loading branch information
baschny authored Jan 11, 2021
2 parents dafeda5 + 423294c commit 93b5aef
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ runs:
echo "::set-output name=composer_major_version::${DETECTED_MAJOR_VERSION}"
echo "::set-output name=composer_version::${DETECTED_VERSION}"
COMPOSER_DOCKER="docker run --rm --user 1001 --volume ${RUNNER_WORKSPACE}/composer:/tmp --volume ${GITHUB_WORKSPACE}:/app -w /app composer:${COMPOSER_VERSION}"
if [ "$GITHUB_OAUTH" ]; then
docker run --rm --volume ${RUNNER_WORKSPACE}/composer:/tmp \
composer:${COMPOSER_VERSION} config -g github-oauth.github.com $GITHUB_OAUTH
$COMPOSER_DOCKER config -g github-oauth.github.com $GITHUB_OAUTH
fi
case "${COMPOSER_COMMAND}" in
Expand All @@ -70,11 +70,7 @@ runs:
*)
echo "Running composer v${DETECTED_VERSION} with: $COMPOSER_COMMAND $COMPOSER_ARGS"
docker run --rm \
--volume ${RUNNER_WORKSPACE}/composer:/tmp \
--volume ${GITHUB_WORKSPACE}:/app \
-w /app \
composer:${COMPOSER_VERSION} $COMPOSER_COMMAND $COMPOSER_ARGS
$COMPOSER_DOCKER $COMPOSER_COMMAND $COMPOSER_ARGS
;;
esac
Expand Down

0 comments on commit 93b5aef

Please sign in to comment.