diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b26693b56..d0ad397a7 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 cache: yarn - name: Install dependencies diff --git a/.github/workflows/test-loop-action.yml b/.github/workflows/test-loop-action.yml deleted file mode 100644 index 70f854fb7..000000000 --- a/.github/workflows/test-loop-action.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Test Loop - -on: - push: - branches: - - main - # Review gh actions docs if you want to further define triggers, paths, etc - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on - -env: - GH_TOKEN: ${{ github.token }} - -jobs: - run_for: - name: run_for - runs-on: ubuntu-latest - steps: - # clone code. - - uses: actions/checkout@v3 - - # print context - - name: for print 1-5 - run: | - for id in {1..5} - do - echo "正在处理文件 id" - done - - pwd - ls -l - - IFS=$'\n' - - for file in $(ls -l) - do - echo "正在处理文件 $file" - done - git config --global user.email samzong-bot@gmail.com - git config --global user.name samzong-bot - git config advice.addIgnoredFile false - git checkout -b test-k8s-docs - gh repo clone kubernetes/website tmp - cd tmp - ls -l - rm -rf .git build - git add -v . - cd .. - git status - git commit -m "add test" - git push origin test-k8s-docs --force - diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b7e9a873b..20e21b8cf 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: Test deployment +name: Test and label PRs on: pull_request: @@ -8,17 +8,47 @@ on: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on jobs: - test-deploy: - name: Test deployment + # PR test + pr-test: + name: PR test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 cache: yarn - name: Install dependencies run: yarn install --frozen-lockfile - name: Test build website - run: yarn build \ No newline at end of file + run: yarn build + + # add pull request size label + size-labeler: + permissions: + issues: write + pull-requests: write + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: codelytv/pr-size-labeler@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + xs_label: "size/xs" + xs_max_size: "9" + s_label: "size/s" + s_max_size: "29" + m_label: "size/m" + m_max_size: "99" + l_label: "size/l" + l_max_size: "499" + xl_label: "size/xl" + xl_max_size: "999" + xll_label: "size/xll" + xll_max_size: "1999" + fail_if_xll: "false" + message_if_xll: > + This PR exceeds the recommended size of 2000 lines. + Please make sure you are NOT addressing multiple issues with one PR. + Note this PR might be rejected due to its size.