From c6f09ccec993679332efd3f10eeab83b07b3e656 Mon Sep 17 00:00:00 2001 From: Mihovil Ilakovac Date: Mon, 26 Aug 2024 15:37:12 +0200 Subject: [PATCH] Update values --- .github/workflows/deploy.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5a9c88c..16dac77 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,13 @@ on: env: WASP_TELEMETRY_DISABLED: 1 + SERVER_APP_NAME: "render-ghcr-server" + # After you know the server URL, you can replace the placeholder with the actual URL + SERVER_APP_URL: "http://localhost:3000" + CLIENT_APP_NAME: "render-ghcr-client" + DOCKER_REGISTRY: "ghcr.io" + DOCKER_REGISTRY_USERNAME: ${{ github.actor }} + DOCKER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} jobs: build-and-push-images: @@ -21,23 +28,23 @@ jobs: uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action@v3 with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} + registry: ghcr.io + username: ${{ env.DOCKER_REGISTRY_USERNAME }} + password: ${{ env.DOCKER_REGISTRY_PASSWORD }} - name: (server) Extract metadata for Docker id: meta-server uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: - images: ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REGISTRY_USERNAME }}/${{ secrets.SERVER_APP_NAME }} + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REGISTRY_USERNAME }}/${{ env.SERVER_APP_NAME }} - name: (client) Extract metadata for Docker id: meta-client uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: - images: ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REGISTRY_USERNAME }}/${{ secrets.CLIENT_APP_NAME }} + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REGISTRY_USERNAME }}/${{ env.CLIENT_APP_NAME }} - name: Install Wasp shell: bash @@ -51,7 +58,7 @@ jobs: shell: bash run: | cd ./.wasp/build/web-app - REACT_APP_API_URL=${{ secrets.SERVER_APP_URL }} npm run build + REACT_APP_API_URL=${{ env.SERVER_APP_URL }} npm run build - name: (client) Prepare the Dockerfile shell: bash