Skip to content

Commit

Permalink
Update values
Browse files Browse the repository at this point in the history
  • Loading branch information
infomiho committed Aug 26, 2024
1 parent 98a5b65 commit c6f09cc
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c6f09cc

Please sign in to comment.