Skip to content

Commit ca11b9c

Browse files
committed
~xray-tproxy -no schedule
1 parent e53e347 commit ca11b9c

File tree

1 file changed

+1
-43
lines changed

1 file changed

+1
-43
lines changed

.github/workflows/xray-tproxy-docker.yaml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ on:
1313
- xray-tproxy/entrypoint.sh
1414
- .github/workflows/xray-tproxy-docker.yaml
1515
workflow_dispatch:
16-
schedule:
17-
- cron: ' 0 22 * * 6'
1816

1917
env:
2018
IMAGE_CONTEXT: ./xray-tproxy
@@ -25,8 +23,6 @@ jobs:
2523
runs-on: ubuntu-latest
2624
outputs:
2725
remote_version: ${{ steps.remote_version.outputs.remote_version }}
28-
local_version: ${{ steps.local_version.outputs.local_version }}
29-
should_build: ${{ steps.should_build.outputs.should_build }}
3026
steps:
3127
# 1. 获取远程版本
3228
- name: Get remote version
@@ -55,44 +51,6 @@ jobs:
5551
echo "Remove Version: $LATEST_DOCKER_TAG"
5652
echo "remote_version=$LATEST_DOCKER_TAG" >> $GITHUB_OUTPUT
5753
58-
# 2. 获取本地版本
59-
- name: Get local version
60-
id: local_version
61-
run: |
62-
# 使用 curl 和 jq 查询 Docker Hub API
63-
DOCKERHUB_TAG_1=$(curl -s "https://hub.docker.com/v2/repositories/${{ env.REGISTRY_IMAGE }}/tags/" | jq -r '.results[0].name')
64-
DOCKERHUB_TAG_2=$(curl -s "https://hub.docker.com/v2/repositories/${{ env.REGISTRY_IMAGE }}/tags/" | jq -r '.results[1].name')
65-
66-
# 排除掉 latest 标签
67-
if [ "$DOCKERHUB_TAG_2" == "latest" ]; then
68-
DOCKERHUB_TAG=$DOCKERHUB_TAG_1
69-
elif [ "$DOCKERHUB_TAG_1" == "latest" ]; then
70-
DOCKERHUB_TAG=$DOCKERHUB_TAG_2
71-
fi
72-
73-
if [ -z "$DOCKERHUB_TAG" ] || [ "$DOCKERHUB_TAG" = "null" ]; then
74-
# 如果没有找到任何 Tag (可能是新镜像或 API 失败),我们可以假定需要构建
75-
echo "Warning: Could not reliably determine Docker Hub latest tag. Assuming build required."
76-
LATEST_DOCKER_TAG="v0.0.0" # 设置一个低版本,确保下一步触发
77-
else
78-
LATEST_DOCKER_TAG=$DOCKERHUB_TAG
79-
fi
80-
81-
echo "Local version: $LATEST_DOCKER_TAG"
82-
echo "local_version=$LATEST_DOCKER_TAG" >> $GITHUB_OUTPUT
83-
84-
# 3. 判断是否需要触发后续操作
85-
- name: Check for New Release
86-
id: should_build
87-
run: |
88-
if [ "${{ steps.remote_version.outputs.remote_version }}" != "${{ steps.local_version.outputs.local_version }}" ]; then
89-
echo "New release found! Remote version: ${{ steps.remote_version.outputs.remote_version }}, Local version: ${{ steps.local_version.outputs.local_version }}"
90-
echo "should_build=true" >> $GITHUB_OUTPUT
91-
else
92-
echo "No new release found! Remote version: ${{ steps.remote_version.outputs.remote_version }}, Local version: ${{ steps.local_version.outputs.local_version }}"
93-
echo "should_build=false" >> $GITHUB_OUTPUT
94-
fi
95-
9654
build-images:
9755
runs-on: ubuntu-latest
9856
permissions:
@@ -110,7 +68,7 @@ jobs:
11068
linux/s390x
11169
needs:
11270
- check-updates
113-
if: ${{ needs.check-updates.outputs.should_build == 'true' }} || || github.event_name == 'workflow_dispatch'
71+
if: github.event_name == 'workflow_dispatch'
11472
steps:
11573
- name: Prepare
11674
run: |

0 commit comments

Comments
 (0)