fix(ci): 修正 Release workflow 確保 Docker Image 正確發佈
- dockerhub-description.yml: - 修正 IMAGE_NAME 為 convertx/convertx-cn - 新增 continue-on-error 避免阻擋 Release - 新增 workflow_run 觸發器 - release.yml: - 新增 workflow_dispatch 手動觸發支援 - 新增 permissions 設定 - 優化 disk cleanup 錯誤處理 - docker-publish.yml: - 修正 DOCKERHUB_USERNAME 從 secrets 讀取 - 修正 DOCKER_IMAGE 為正確的 convertx/convertx-cn
This commit is contained in:
parent
f675a68d87
commit
44152ff872
3 changed files with 81 additions and 25 deletions
13
.github/workflows/docker-publish.yml
vendored
13
.github/workflows/docker-publish.yml
vendored
|
|
@ -1,6 +1,8 @@
|
|||
name: Docker
|
||||
|
||||
# thanks to https://github.com/sredevopsorg/multi-arch-docker-github-workflow
|
||||
# This workflow builds and publishes to GHCR (GitHub Container Registry)
|
||||
# For Docker Hub releases, see release.yml
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -9,9 +11,12 @@ on:
|
|||
pull_request:
|
||||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
DOCKERHUB_USERNAME: c4illin
|
||||
# GitHub Container Registry image name
|
||||
GHCR_IMAGE: ghcr.io/${{ github.repository }}
|
||||
# Docker Hub image name (for merge job)
|
||||
DOCKER_IMAGE: convertx/convertx-cn
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
@ -161,7 +166,7 @@ jobs:
|
|||
with:
|
||||
images: |
|
||||
ghcr.io/${{ env.REPO }}
|
||||
${{ env.IMAGE_NAME }}
|
||||
${{ env.DOCKER_IMAGE }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
|
@ -176,7 +181,7 @@ jobs:
|
|||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ env.DOCKERHUB_USERNAME }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Get execution timestamp with RFC3339 format
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue