Skip to content

Commit

Permalink
fix(composer-install): fix permission error on install
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Aug 16, 2024
1 parent 58ed418 commit 179e117
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions composer-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,18 @@ runs:
IMAGE: ${{ steps.prepare.outputs.image }}
#language=bash
run: |
cacheFolder=/tmp/composer-cache
user="$(id -u):$(id -g)"
sudo mkdir -p "$cacheFolder"
sudo chown -R "$user" "$cacheFolder"
docker run \
--env-file "$ENV_FILE" \
--volume $PWD:/app \
--volume /tmp/composer-cache:/root/.composer \
--volume "$PWD:/app" \
--volume "$cacheFolder:/root/.composer" \
"$IMAGE" \
composer $COMMAND --no-interaction --no-progress $FLAGS
sudo chown -R "$(id -u):$(id -g)" /tmp/composer-cache
sudo chown -R "$(id -u):$(id -g)" vendor
sudo chown -R "$user" "$cacheFolder"
sudo chown -R "$user" vendor

0 comments on commit 179e117

Please sign in to comment.