Skip to content

Commit

Permalink
Get and pass the GitHub Action user to fix docker permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
defunctl committed Feb 20, 2024
1 parent 1f6d321 commit c83d860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ jobs:
run: |
sed -i -e 's/WP_VERSION=""/WP_VERSION="nightly"/g' tests/codeception.env
- name: Set UID and GID for docker
run: |
printf 'UID=%d\nGID=%d\n' $(id -u) $(id -g) > .env.ci
- name: Start project containers
run: ./bin/test-up.sh
run: docker compose --env-file .env --env-file .env.ci up -d

- name: Wait for project to be ready
run: ./bin/wait-for-it.sh http://localhost:7253
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
restart: always
ports:
- ${WP_PORT}:80
user: "${UID:-1000}:${GID:-1000}"
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: wp
Expand Down

0 comments on commit c83d860

Please sign in to comment.