mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
ci: release cloud prod (#3351)
This commit is contained in:
parent
394637f200
commit
6c4a9c336f
2 changed files with 19 additions and 10 deletions
25
.github/workflows/release-cloud.yml
vendored
25
.github/workflows/release-cloud.yml
vendored
|
@ -2,6 +2,15 @@ name: Release Cloud
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
target:
|
||||
description: 'The release target of Logto Cloud'
|
||||
required: true
|
||||
default: cloud
|
||||
type: choice
|
||||
options:
|
||||
- cloud
|
||||
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
@ -11,7 +20,6 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
dockerize:
|
||||
environment: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || '' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -25,9 +33,9 @@ jobs:
|
|||
with:
|
||||
images: |
|
||||
ghcr.io/logto-io/cloud
|
||||
# https://github.com/docker/metadata-action#typesemver
|
||||
# https://github.com/docker/metadata-action
|
||||
tags: |
|
||||
type=edge
|
||||
type=raw,value=${{ inputs.target == 'cloud' && 'prod' || 'edge' }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
|
@ -47,12 +55,13 @@ jobs:
|
|||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args:
|
||||
- admin_endpoint: https://auth.logto.${{ inputs.target == 'cloud' && 'io' || 'dev' }}/
|
||||
|
||||
deploy-dev:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: dockerize
|
||||
environment: cloud-dev
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
environment: ${{ inputs.target == 'cloud' && 'cloud-prod' || 'cloud-dev' }}
|
||||
|
||||
steps:
|
||||
- name: Login to GitHub Container Registry
|
||||
|
@ -70,5 +79,5 @@ jobs:
|
|||
- name: Deploy to containerapp
|
||||
uses: azure/webapps-deploy@v2
|
||||
with:
|
||||
app-name: logto-cloud-dev
|
||||
images: ghcr.io/logto-io/cloud:edge
|
||||
app-name: logto-cloud-${{ inputs.target == 'cloud' && 'eu' || 'dev' }}
|
||||
images: ghcr.io/logto-io/cloud:${{ inputs.target == 'cloud' && 'prod' || 'edge' }}
|
||||
|
|
|
@ -21,8 +21,8 @@ RUN pnpm i
|
|||
# Admin Console build env
|
||||
ENV CONSOLE_PUBLIC_URL=/
|
||||
ENV IS_CLOUD=1
|
||||
# Temporarily use it for Admin Console build, will try to use runtime technique later
|
||||
ENV ADMIN_ENDPOINT=https://auth.logto.dev/
|
||||
ARG admin_endpoint
|
||||
ENV ADMIN_ENDPOINT=${admin_endpoint}
|
||||
RUN pnpm prepack
|
||||
RUN pnpm -r --filter @logto/console --filter @logto/cloud build
|
||||
|
||||
|
|
Loading…
Reference in a new issue