Skip to content

Commit aa0e30f

Browse files
committed
feat(Docker): publish latest and latest-en
1 parent 2c9db24 commit aa0e30f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/sharevb-docker-realease-latest.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
runs-on: ubuntu-latest
4242
needs:
4343
- ci
44+
strategy:
45+
matrix:
46+
language: ['', 'en', 'zh']
4447
steps:
4548
- name: Docker meta
4649
id: meta
@@ -80,12 +83,13 @@ jobs:
8083
file: ./Dockerfile
8184
build-args: |
8285
"BASE_URL=/"
86+
"VITE_AVAILABLE_LOCALES=${{ matrix.language }}"
8387
platforms: linux/amd64,linux/arm64
8488
push: true
8589
labels: ${{ steps.meta.outputs.labels }}
8690
tags: |
87-
sharevb/it-tools:latest
88-
ghcr.io/${{ github.repository_owner }}/it-tools:latest
91+
sharevb/it-tools:${{ case(matrix.language, format('latest-{0}', matrix.language), 'latest') }}
92+
ghcr.io/sharevb/it-tools:${{ case(matrix.language, format('latest-{0}', matrix.language), 'latest') }}
8993
9094
# Optionally log out
9195
- name: Log out from GitHub Container Registry

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default defineConfig({
3838
],
3939
strictMessage: false,
4040
escapeHtml: true,
41+
onlyLocales: (process.env.VITE_AVAILABLE_LOCALES || '').split(/,/),
4142
}),
4243
AutoImport({
4344
imports: [

0 commit comments

Comments
 (0)