This commit is contained in:
parent
5ddfda604d
commit
9dc2a54eb7
@ -11,22 +11,10 @@ jobs:
|
|||||||
|
|
||||||
if: "contains(github.event.head_commit.message, 'Release')"
|
if: "contains(github.event.head_commit.message, 'Release')"
|
||||||
|
|
||||||
|
env: # ⭐ 新增环境变量,阻止自动拉取镜像
|
||||||
|
ACT_PULL: never
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 检查本地是否已经有 gitea/runner-images:ubuntu-latest 镜像
|
|
||||||
id: check_image
|
|
||||||
run: |
|
|
||||||
if docker image inspect gitea/runner-images:ubuntu-latest >/dev/null 2>&1; then
|
|
||||||
echo "gitea/runner-images:ubuntu-latest image is already present locally. Skipping pull."
|
|
||||||
echo "should_pull=false" >> $GITEA_OUTPUT
|
|
||||||
else
|
|
||||||
echo "gitea/runner-images:ubuntu-latest image is not present locally. Will pull."
|
|
||||||
echo "should_pull=true" >> $GITEA_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 下载 gitea/runner-images:ubuntu-latest 镜像
|
|
||||||
if: steps.check_image.outputs.should_pull == 'true'
|
|
||||||
run: docker pull gitea/runner-images:ubuntu-latest
|
|
||||||
|
|
||||||
- name: 替换软件源为国内软件源
|
- name: 替换软件源为国内软件源
|
||||||
run: |
|
run: |
|
||||||
cat /etc/os-release
|
cat /etc/os-release
|
||||||
@ -68,7 +56,7 @@ jobs:
|
|||||||
# git clone "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" .
|
# git clone "https://${GITEA_TOKEN}@${CLEAN_REPO_URL}" .
|
||||||
|
|
||||||
- name: 检出仓库
|
- name: 检出仓库
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 设置 Git 身份
|
- name: 设置 Git 身份
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user