Skip to content

Commit 73f8597

Browse files
committed
docker build
1 parent db5b27d commit 73f8597

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ jobs:
6464
- name: Download WordPress
6565
if: steps.cache-wordpress.outputs.cache-hit != 'true'
6666
run: |
67+
mkdir -p /tmp/wp
6768
curl -O https://wordpress.org/wordpress-${WP_VERSION}.tar.gz
68-
tar -xzf wordpress-${WP_VERSION}.tar.gz
69+
tar -xzf wordpress-${WP_VERSION}.tar.gz --strip-components=1 -C /tmp/wp
6970
rm wordpress-${WP_VERSION}.tar.gz
7071
7172
- name: Set up Docker Buildx
@@ -90,7 +91,8 @@ jobs:
9091
--name frankenphp \
9192
--network host \
9293
-p 8100:8100 \
93-
-v $GITHUB_WORKSPACE/wordpress:/var/www/html \
94+
-v /tmp/wp:/var/www/html \
95+
-v $GITHUB_WORKSPACE:/var/www/html/wp-content/plugins/simpleanalytics \
9496
-v $GITHUB_WORKSPACE/Caddyfile:/etc/frankenphp/Caddyfile \
9597
frankenphp-${{ matrix.php }}
9698
@@ -102,23 +104,23 @@ jobs:
102104
--dbuser="$WP_DB_USER" \
103105
--dbpass="$WP_DB_PASS" \
104106
--dbhost="$WP_DB_HOST" \
105-
--path=wordpress \
107+
--path=/tmp/wp \
106108
--skip-check
107109
wp core install \
108110
--url="${WP_SITE_URL}" \
109111
--title="Test Site" \
110112
--admin_user=admin \
111113
--admin_password=admin \
112114
113-
--path=wordpress \
115+
--path=/tmp/wp \
114116
--skip-email \
115117
--allow-root
116-
wp user create author [email protected] --role=author --user_pass=author --path=wordpress
117-
wp user create editor [email protected] --role=editor --user_pass=editor --path=wordpress
118-
wp user create subscriber [email protected] --role=subscriber --user_pass=subscriber --path=wordpress
118+
wp user create author [email protected] --role=author --user_pass=author --path=/tmp/wp
119+
wp user create editor [email protected] --role=editor --user_pass=editor --path=/tmp/wp
120+
wp user create subscriber [email protected] --role=subscriber --user_pass=subscriber --path=/tmp/wp
119121
120122
- name: Show current config values
121-
run: wp config list --path=wordpress --allow-root
123+
run: wp config list --path=/tmp/wp --allow-root
122124

123125
- name: Install plugin
124126
run: |

0 commit comments

Comments
 (0)