mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
ci: separate core and cloud env (#3594)
* ci: separate core and cloud env for better env management * chore: update app name vars
This commit is contained in:
parent
a3c8515f3f
commit
c22daded89
1 changed files with 6 additions and 6 deletions
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
@ -138,7 +138,7 @@ jobs:
|
|||
deploy-core:
|
||||
runs-on: ubuntu-latest
|
||||
needs: dockerize-core
|
||||
environment: ${{ inputs.target || 'dev' }}
|
||||
environment: ${{ inputs.target || 'dev' }}-core
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
steps:
|
||||
|
@ -168,18 +168,18 @@ jobs:
|
|||
- name: Deploy core to containerapp
|
||||
uses: azure/webapps-deploy@v2
|
||||
with:
|
||||
app-name: ${{ vars.APP_NAME_CORE }}
|
||||
app-name: ${{ vars.APP_NAME }}
|
||||
slot-name: staging
|
||||
images: ghcr.io/logto-io/logto:sha-${{ steps.sha.outputs.short }}
|
||||
|
||||
- name: Swap core to production
|
||||
# See https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/slot?view=azure-cli-latest#az-webapp-deployment-slot-swap
|
||||
run: az webapp deployment slot swap -g ${{ vars.RESOURCE_GROUP }} -n ${{ vars.APP_NAME_CORE }} --slot staging
|
||||
run: az webapp deployment slot swap -g ${{ vars.RESOURCE_GROUP }} -n ${{ vars.APP_NAME }} --slot staging
|
||||
|
||||
deploy-cloud:
|
||||
runs-on: ubuntu-latest
|
||||
needs: dockerize-cloud
|
||||
environment: ${{ inputs.target || 'dev' }}
|
||||
environment: ${{ inputs.target || 'dev' }}-cloud
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
steps:
|
||||
|
@ -204,13 +204,13 @@ jobs:
|
|||
- name: Deploy cloud to containerapp
|
||||
uses: azure/webapps-deploy@v2
|
||||
with:
|
||||
app-name: ${{ vars.APP_NAME_CLOUD }}
|
||||
app-name: ${{ vars.APP_NAME }}
|
||||
slot-name: staging
|
||||
images: ghcr.io/logto-io/cloud:sha-${{ steps.sha.outputs.short }}
|
||||
|
||||
- name: Swap cloud to production
|
||||
# See https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/slot?view=azure-cli-latest#az-webapp-deployment-slot-swap
|
||||
run: az webapp deployment slot swap -g ${{ vars.RESOURCE_GROUP }} -n ${{ vars.APP_NAME_CLOUD }} --slot staging
|
||||
run: az webapp deployment slot swap -g ${{ vars.RESOURCE_GROUP }} -n ${{ vars.APP_NAME }} --slot staging
|
||||
|
||||
# Publish packages and create git tags if needed
|
||||
publish-and-tag:
|
||||
|
|
Loading…
Reference in a new issue