添加git代理
Some checks failed
Build NGINX on Ubuntu / build-and-push (push) Failing after 31s
Build NGINX on Ubuntu / deploy-to-kubernetes (push) Has been skipped

This commit is contained in:
huangzhiqiang 2025-06-09 18:13:30 +08:00
parent fa6d686acf
commit aaec3e0b21

View File

@ -18,6 +18,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: 设置 Git 代理
run: |
if [ -n "${{ env.GIT_PROXY }}" ]; then
echo "配置 Git 代理: ${{ env.GIT_PROXY }}"
git config --global http.proxy ${{ env.GIT_PROXY }}
git config --global https.proxy ${{ env.GIT_PROXY }}
else
echo "未设置 GIT_PROXY 环境变量,跳过代理配置"
fi
- name: 检出代码
uses: actions/checkout@v4