From bab63f74deb763e0028a480f247af5a15d9a196b Mon Sep 17 00:00:00 2001 From: Mason Date: Wed, 21 Oct 2026 11:29:39 +0800 Subject: [PATCH 1/2] ci: override package mirrors via build args --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e149e4..b6b42ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,3 +18,7 @@ include: platforms: "linux/amd64,linux/arm64" proxy: http://172.21.1.212:7897 no_proxy: "localhost,127.0.0.1,docker,${CI_REGISTRY},${CI_SERVER_HOST},registry.opencsg.com" + build_args: + - "APT_MIRROR=https://mirrors.aliyun.com" + - "PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/" + - "PIP_TRUSTED_HOST=mirrors.aliyun.com" From 6e6faf4ea80bbb592cc93c7e762bbb946ea7f9a3 Mon Sep 17 00:00:00 2001 From: Mason Date: Wed, 21 Oct 2026 11:35:18 +0800 Subject: [PATCH 2/2] ci: pin gitleaks version to fix 404 download --- .github/workflows/gitleaks.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index 1453c63..c921af2 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -5,6 +5,7 @@ on: env: ACTIONS_STEP_DEBUG: '${{ secrets.ACTIONS_STEP_DEBUG }}' + GITLEAKS_VERSION: "8.30.1" jobs: gitleaks: @@ -13,31 +14,13 @@ jobs: steps: - uses: hmarr/debug-action@v3.0.0 - - name: Install - shell: bash - run: | - set -euo pipefail - arch="$(uname)_$(uname -m)" - platform=$(echo $arch | tr '[:upper:]' '[:lower:]' ) - echo "PLATFORM=$platform" >> $GITHUB_ENV - echo "GITLEAKS_VERSION=$(curl -s https://api.github.com/repos/gitleaks/gitleaks/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')" >> $GITHUB_ENV - - - name: Cache gitleaks archive - id: cache_gitleaks - uses: actions/cache@v5 - with: - path: /usr/local/bin/gitleaks - key: gitleaks-${{ env.PLATFORM }}-${{ env.GITLEAKS_VERSION }} - - name: Download and configure gitleaks shell: bash run: | set -euo pipefail - if [[ "${{ steps.cache_gitleaks.outputs.cache-hit }}" != "true" ]]; then - DOWNLOAD_URL="https://github.com/gitleaks/gitleaks/releases/download/v${{ env.GITLEAKS_VERSION }}/gitleaks_${{ env.GITLEAKS_VERSION }}_linux_x64.tar.gz" - echo "Download Gitleaks ${{ env.GITLEAKS_VERSION }} for ${{ env.PLATFORM }} from ${DOWNLOAD_URL}" - curl -fsSL "$DOWNLOAD_URL" | tar xzf - -C /usr/local/bin - fi + DOWNLOAD_URL="https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" + echo "Download Gitleaks ${GITLEAKS_VERSION} from ${DOWNLOAD_URL}" + curl -fsSL "$DOWNLOAD_URL" | tar xzf - -C /usr/local/bin chmod +x /usr/local/bin/gitleaks - name: Checkout