Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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