Skip to content

Commit 49dc66e

Browse files
committed
fix: 不进行gitee/gitlab/阿里云容器镜像同步
1 parent d83cbc2 commit 49dc66e

3 files changed

Lines changed: 42 additions & 34 deletions

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,14 @@ jobs:
102102
curl -fsSL "https://purge.jsdelivr.net/gh/${REPO_LOWER}@master/${file}" >/dev/null || true
103103
done
104104
105-
- name: Trigger sync
106-
env:
107-
GH_REPO: ${{ github.repository }}
108-
GH_TOKEN: ${{ github.token }}
109-
GH_DEBUG: api
110-
run: |
111-
gh workflow run sync-release.yml
105+
# Gitee release sync is disabled.
106+
# - name: Trigger sync
107+
# env:
108+
# GH_REPO: ${{ github.repository }}
109+
# GH_TOKEN: ${{ github.token }}
110+
# GH_DEBUG: api
111+
# run: |
112+
# gh workflow run sync-release.yml
112113

113114
release-docker:
114115
runs-on: ubuntu-latest
@@ -142,12 +143,13 @@ jobs:
142143
username: ${{ github.repository_owner }}
143144
password: ${{ github.token }}
144145

145-
- name: Log in to the AliyunCS
146-
uses: docker/login-action@master
147-
with:
148-
registry: registry.cn-shanghai.aliyuncs.com
149-
username: ${{ secrets.ALI_USER }}
150-
password: ${{ secrets.ALI_PAT }}
146+
# Aliyun image publishing is disabled.
147+
# - name: Log in to the AliyunCS
148+
# uses: docker/login-action@master
149+
# with:
150+
# registry: registry.cn-shanghai.aliyuncs.com
151+
# username: ${{ secrets.ALI_USER }}
152+
# password: ${{ secrets.ALI_PAT }}
151153

152154
- name: Set up QEMU
153155
uses: docker/setup-qemu-action@v3
@@ -158,12 +160,13 @@ jobs:
158160
- name: Set up image name
159161
run: |
160162
GHCR_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
161-
if [ ${{ github.repository_owner }} = "naiba" ]
162-
then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard")
163-
else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
164-
fi
165163
echo "GHCR_IMAGE_NAME=$GHCR_IMAGE_NAME" >> $GITHUB_OUTPUT
166-
echo "ALI_IMAGE_NAME=$ALI_IMAGE_NAME" >> $GITHUB_OUTPUT
164+
# Aliyun image publishing is disabled.
165+
# if [ ${{ github.repository_owner }} = "naiba" ]
166+
# then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard")
167+
# else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
168+
# fi
169+
# echo "ALI_IMAGE_NAME=$ALI_IMAGE_NAME" >> $GITHUB_OUTPUT
167170
id: image-name
168171

169172
- name: Build dasbboard image And Push
@@ -176,5 +179,5 @@ jobs:
176179
tags: |
177180
${{ steps.image-name.outputs.GHCR_IMAGE_NAME }}:latest
178181
${{ steps.image-name.outputs.GHCR_IMAGE_NAME }}:${{ steps.extract_branch.outputs.tag }}
179-
${{ steps.image-name.outputs.ALI_IMAGE_NAME }}:latest
180-
${{ steps.image-name.outputs.ALI_IMAGE_NAME }}:${{ steps.extract_branch.outputs.tag }}
182+
# ${{ steps.image-name.outputs.ALI_IMAGE_NAME }}:latest
183+
# ${{ steps.image-name.outputs.ALI_IMAGE_NAME }}:${{ steps.extract_branch.outputs.tag }}

.github/workflows/sync-code.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ jobs:
88
sync-to-jihulab:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
12-
- uses: adambirds/sync-github-to-gitlab-action@v1.1.0
13-
with:
14-
destination_repository: git@gitee.com:naibahq/nezha.git
15-
destination_branch_name: master
16-
destination_ssh_key: ${{ secrets.GITLAB_SSH_KEY }}
11+
- name: GitLab or Gitee sync disabled
12+
run: echo "Repository sync is disabled."
13+
# - uses: actions/checkout@v4
14+
# - uses: adambirds/sync-github-to-gitlab-action@v1.1.0
15+
# with:
16+
# destination_repository: git@gitee.com:naibahq/nezha.git
17+
# destination_branch_name: master
18+
# destination_ssh_key: ${{ secrets.GITLAB_SSH_KEY }}

.github/workflows/sync-release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: Sync Release to Gitee
22

33
on:
44
workflow_dispatch:
5-
5+
66
jobs:
77
sync-release-to-gitee:
88
runs-on: ubuntu-latest
99
timeout-minutes: 30
10-
env:
11-
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
1210
steps:
13-
- uses: actions/checkout@v4
14-
- name: Sync to Gitee
15-
run: |
16-
pip3 install PyGitHub
17-
python3 .github/sync.py
11+
- name: Gitee sync disabled
12+
run: echo "Gitee release sync is disabled."
13+
# env:
14+
# GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
15+
# steps:
16+
# - uses: actions/checkout@v4
17+
# - name: Sync to Gitee
18+
# run: |
19+
# pip3 install PyGitHub
20+
# python3 .github/sync.py

0 commit comments

Comments
 (0)