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:
parent
8fc6c3c803
commit
42e5dab7c6
2 changed files with 4 additions and 8 deletions
2
.github/workflows/clean-up-images.yml
vendored
2
.github/workflows/clean-up-images.yml
vendored
|
@ -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 }}
|
||||
|
|
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue