From 0093dd7abec5f971e9847f465b166495723d1778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 15 Jan 2025 16:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8Bsparse-checkout.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/测http-server.yaml | 23 ------------------ .github/workflows/测sparse-checkout.yaml | 30 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/测http-server.yaml create mode 100644 .github/workflows/测sparse-checkout.yaml diff --git a/.github/workflows/测http-server.yaml b/.github/workflows/测http-server.yaml deleted file mode 100644 index 3e2891d..0000000 --- a/.github/workflows/测http-server.yaml +++ /dev/null @@ -1,23 +0,0 @@ -on: - push: -defaults: - run: - shell: bash -env: - TZ: Asia/Shanghai -jobs: - test-httpserver: - runs-on: ubuntu-latest - steps: - - name: step1 - run: | - set -x - mkdir -p gitea - echo '

hello world

' > gitea/index.html - npm install -g http-server - npx http-server -p=4251 ./gitea & - SERVER_PID=$! - sleep 10 # 等待服务器启动 - curl http://localhost:4251/ -v - kill $SERVER_PID - - run: echo "DONE" \ No newline at end of file diff --git a/.github/workflows/测sparse-checkout.yaml b/.github/workflows/测sparse-checkout.yaml new file mode 100644 index 0000000..966d6e5 --- /dev/null +++ b/.github/workflows/测sparse-checkout.yaml @@ -0,0 +1,30 @@ +on: + push: +defaults: + run: + shell: bash +env: + TZ: Asia/Shanghai +jobs: + job1: + runs-on: ubuntu-latest + steps: + - name: 📥 检出代码 + uses: actions/checkout@main + with: + lfs: false + sparse-checkout: | + README.md + sparse-checkout-cone-mode: false + - run: ls -al + job2: + runs-on: ubuntu-latest + steps: + - name: 📥 检出代码 + uses: actions/checkout@main + with: + lfs: false + sparse-checkout: | + README.md + sparse-checkout-cone-mode: true + - run: ls -al \ No newline at end of file