Skip to content

Release Docker Image #46

Release Docker Image

Release Docker Image #46

Workflow file for this run

name: Release Docker Image
on:
workflow_dispatch:
# 运行预发行镜像而无需合并到主分支,例如 v0.13.3rc1
inputs:
image_tag:
description: '镜像标签( -sillot 会自动补全因此禁止输入 ) 完整输入示例:v0.27.25 '
required: true
default: 'v0.'
jobs:
build:
name: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
ref: ${{ github.event.ref }}
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PWD }}
- name: Build the Docker image
run: |
docker buildx build --push --platform linux/amd64 -t soltus/sillot:latest -t soltus/sillot:${{ github.event.inputs.image_tag }}-sillot .
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PWD }}
repository: soltus/sillot # 这是 docker hub 的不是 github 的
readme-filepath: ./.github/README.md
short-description: ${{ github.event.repository.description }}
enable-url-completion: true