From 47c8315e8960fdaec2d22760dcc855cadc19fe3f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 26 Jun 2026 18:40:04 +0800 Subject: [PATCH] fix(ci): remove container field to run on host directly --- .gitea/workflows/ci-cd.yml | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 0cffe5933..b4caef889 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -18,35 +18,10 @@ jobs: validate: name: Validate Code Quality And Tests runs-on: ubuntu-latest - container: xiaoxia-ci-python:3.12 steps: - name: Checkout code - run: | - python - <<'PY' - import os - import tarfile - import urllib.request - - api_url = os.environ['GITHUB_API_URL'] - repository = os.environ['GITHUB_REPOSITORY'] - sha = os.environ['GITHUB_SHA'] - token = os.environ.get('GITHUB_TOKEN', '') - archive_url = f"{api_url}/repos/{repository}/archive/{sha}.tar.gz" - request = urllib.request.Request(archive_url) - if token: - request.add_header('Authorization', f'token {token}') - with urllib.request.urlopen(request, timeout=120) as response: - with open('/tmp/repo.tar.gz', 'wb') as archive: - archive.write(response.read()) - with tarfile.open('/tmp/repo.tar.gz', 'r:gz') as archive: - members = archive.getmembers() - top_level = members[0].name.split('/')[0] + '/' - for member in members: - member.name = member.name.removeprefix(top_level) - if member.name: - archive.extract(member, '.') - PY + uses: actions/checkout@v4 - name: Verify CI environment run: | @@ -57,7 +32,7 @@ jobs: python -m flake8 --version bandit --version pytest --version - echo "✅ Prebuilt CI environment is ready" + echo "CI environment is ready" - name: Run code quality checks run: | @@ -91,6 +66,6 @@ jobs: - name: Build summary if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' run: | - echo "✅ Build completed successfully!" + echo "Build completed successfully!" echo "Branch: ${GITHUB_REF_NAME}" echo "Commit: ${GITHUB_SHA}"