Skip to content

Commit 3177078

Browse files
committed
#39 feat: using env variable to set up php docker public version
1 parent 8da4085 commit 3177078

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/php-docker-public.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ jobs:
5050
with:
5151
images: ${{ env.DOCKER_ID }}/${{ env.IMAGE_NAME }}
5252

53+
- name: Copy .env.example to .env
54+
run: cp .env.example .env
55+
56+
- name: Export environment variables
57+
run: |
58+
set -o allexport
59+
source .env
60+
set +o allexport
61+
5362
- name: Build and push Docker image
5463
id: build-and-push
5564
uses: docker/build-push-action@v6
@@ -59,6 +68,6 @@ jobs:
5968
tags: ${{ steps.meta.outputs.tags }}
6069
labels: ${{ steps.meta.outputs.labels }}
6170
build-args: |
62-
PHP_VERSION=8.3
63-
USER_ID=1000
64-
GROUP_ID=1000
71+
PHP_VERSION=${{ env.PHP_VERSION }}
72+
USER_ID=${{ env.USER_ID }}
73+
GROUP_ID=${{ env.GROUP_ID }}

0 commit comments

Comments
 (0)