fix: 修复image名称问题 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Misskey Docker Image (ARMv8) | |
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: # 允许手动触发 | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: 检出仓库 | |
uses: actions/checkout@v4 | |
- name: 设置 QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: 设置 Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 登录到 GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: 获取 GHCR 镜像标签 | |
run: echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY,,}:latest" >> $GITHUB_ENV | |
- name: 构建并推送 Docker 镜像 | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/arm64 | |
push: true | |
tags: ${{ env.IMAGE_NAME }} | |