0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

ci: update release workflow (#3742)

use the target deployment environment `dev` and `prod` to tag current
deployed images instead of `sha-*` since it is unstable and unclear. remove
`sha-*` tagged and untagged images regularly.
This commit is contained in:
Gao Sun 2023-04-23 17:47:28 +08:00 committed by GitHub
parent 8fc6c3c803
commit 42e5dab7c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -17,5 +17,5 @@ jobs:
account-type: org
org-name: logto-io
keep-at-least: 1
untagged-only: true
filter-tags: "sha-*"
token: ${{ secrets.BOT_PAT }}

View file

@ -47,7 +47,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
type=raw,value=${{ inputs.target || 'dev' }},enable=${{ !startsWith(github.ref, 'refs/tags/') }}
type=edge
- name: Login to DockerHub
@ -111,7 +111,7 @@ jobs:
ghcr.io/logto-io/cloud
# https://github.com/docker/metadata-action
tags: |
type=sha
type=raw,value=${{ inputs.target || 'dev' }},enable=${{ !startsWith(github.ref, 'refs/tags/') }}
type=edge
- name: Login to GitHub Container Registry
@ -153,10 +153,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set short sha
id: sha
run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Setup Node and pnpm
if: ${{ (inputs.target || 'dev') == 'dev' && matrix.target == 'core' }}
uses: silverhand-io/actions-node-pnpm-run-steps@v3
@ -186,7 +182,7 @@ jobs:
with:
app-name: ${{ vars.APP_NAME }}
slot-name: staging
images: ghcr.io/logto-io/${{ matrix.image }}:sha-${{ steps.sha.outputs.short }}
images: ghcr.io/logto-io/${{ matrix.image }}:${{ (inputs.target || 'dev') }}
swap-staging-prod:
strategy: