Skip to content

Commit

Permalink
更新 Release Docker Image 工作流 #644
Browse files Browse the repository at this point in the history
  • Loading branch information
Soltus committed Apr 23, 2024
1 parent 0e446bc commit 153850e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Release Docker Image

on:
workflow_dispatch:
# 运行预发行镜像而无需合并到主分支,例如 v0.13.3rc1
# 务必注意:手动触发时请确认选择了正确的分支
inputs:
image_tag:
description: '镜像标签( -sillot 会自动补全因此禁止输入 ) 完整输入示例:v0.27.25 '
description: '镜像标签,留空则使用 package.json 中的版本号。完整输入示例:v0.27.25-rc0 '
required: true
default: 'v0.'
default: ''
push:
branches:
- master
Expand Down Expand Up @@ -65,16 +65,15 @@ jobs:
- name: Extract Sillot version from package.json
uses: sergeysova/jq-action@v2
id: version
if: github.event_name == 'push'
with:
cmd: "jq .version ${{ matrix.string.package_json }} -r"
# amd64 就是 x86_64
- name: Build the Docker image by Workflow Dispatch
if: github.event_name == 'workflow_dispatch'

- name: Build the Docker image use Workflow Dispatch inputs' version
if: ${{ github.event_name == 'workflow_dispatch' && !github.event.inputs.image_tag == '' }}
run: |
docker buildx build --push --platform linux/amd64 -t soltus/sillot:latest -t soltus/sillot:${{ github.event.inputs.image_tag }}-sillot .
- name: Build the Docker image by Push
if: github.event_name == 'push'
- name: Build the Docker image use package_json version
if: ${{ github.event_name == 'push' || github.event.inputs.image_tag == '' }}
run: |
docker buildx build --push --platform linux/amd64 -t soltus/sillot:latest -t soltus/sillot:${{ steps.version.outputs.value }}-sillot .
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sillot",
"version": "0.31.1110",
"version": "0.31.1120",
"syv": "3.0.11",
"sypv": "[]",
"description": "Build Your Eternal Digital Garden",
Expand Down

0 comments on commit 153850e

Please sign in to comment.