Skip to content

chore(release): 精简 Release 说明并抽取 changelog 脚本 #335

chore(release): 精简 Release 说明并抽取 changelog 脚本

chore(release): 精简 Release 说明并抽取 changelog 脚本 #335

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ main, master ]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Pallas-Bot version for image (/health pallas_bot)
id: pallas_ver
run: |
set -euo pipefail
LABEL="$(git describe --tags --always --dirty 2>/dev/null || true)"
if [ -z "${LABEL}" ]; then LABEL="sha-${GITHUB_SHA:0:7}"; fi
echo "label=${LABEL}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push multi-arch image
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
PALLAS_BOT_VERSION=${{ steps.pallas_ver.outputs.label }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/pallas-bot:latest