|
40 | 40 | if: steps.changes.outputs.client == 'true' || steps.changes.outputs.nginx == 'true' |
41 | 41 | uses: docker/setup-buildx-action@v3 |
42 | 42 |
|
43 | | - - name: Create .env.production |
44 | | - if: steps.changes.outputs.client == 'true' |
45 | | - run: | |
46 | | - echo "NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}" > .env.production |
47 | | - echo "NEXT_PUBLIC_AWS_S3=${{ secrets.NEXT_PUBLIC_AWS_S3 }}" >> .env.production |
48 | | - echo "NEXT_PUBLIC_GTM_ID=${{ secrets.NEXT_PUBLIC_GTM_ID }}" >> .env.production |
49 | | - echo "NEXT_PUBLIC_GA_ID=${{ secrets.NEXT_PUBLIC_GA_ID }}" >> .env.production |
50 | | -
|
51 | | - - name: Debug .env.production |
52 | | - if: steps.changes.outputs.client == 'true' |
53 | | - run: | |
54 | | - echo "=== .env.production file exists ===" |
55 | | - ls -la .env.production |
56 | | - echo "=== Variable names in .env.production ===" |
57 | | - cut -d'=' -f1 .env.production |
58 | | - echo "=== Check value lengths ===" |
59 | | - while IFS='=' read -r key value; do |
60 | | - echo "$key length: ${#value}" |
61 | | - done < .env.production |
62 | | -
|
63 | 43 | - name: Build and Push Client image |
64 | 44 | if: steps.changes.outputs.client == 'true' |
65 | 45 | uses: docker/build-push-action@v5 |
|
69 | 49 | file: ./docker/client/Dockerfile |
70 | 50 | tags: ${{ secrets.DOCKER_HUB_USERNAME }}/yogieat-client:latest |
71 | 51 | no-cache: true |
| 52 | + build-args: | |
| 53 | + NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }} |
| 54 | + NEXT_PUBLIC_AWS_S3=${{ secrets.NEXT_PUBLIC_AWS_S3 }} |
| 55 | + NEXT_PUBLIC_GTM_ID=${{ secrets.NEXT_PUBLIC_GTM_ID }} |
| 56 | + NEXT_PUBLIC_GA_ID=${{ secrets.NEXT_PUBLIC_GA_ID }} |
72 | 57 |
|
73 | 58 | - name: Build and Push Nginx image |
74 | 59 | if: steps.changes.outputs.nginx == 'true' |
|
0 commit comments