diff --git a/.github/workflows/noneflow.yml b/.github/workflows/noneflow.yml index 0a48a87e..89608b20 100644 --- a/.github/workflows/noneflow.yml +++ b/.github/workflows/noneflow.yml @@ -12,7 +12,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }} - cancel-in-progress: true + cancel-in-progress: false jobs: plugin_test: @@ -72,6 +72,12 @@ jobs: with: token: ${{ steps.generate-token.outputs.token }} + - name: Cache pre-commit hooks + uses: actions/cache@v3 + with: + path: .cache/.pre-commit + key: noneflow-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + - name: NoneFlow uses: docker://ghcr.io/nonebot/noneflow:latest with: @@ -88,3 +94,7 @@ jobs: PLUGIN_TEST_METADATA: ${{ needs.plugin_test.outputs.metadata }} APP_ID: ${{ secrets.APP_ID }} PRIVATE_KEY: ${{ secrets.APP_KEY }} + PRE_COMMIT_HOME: /github/workspace/.cache/.pre-commit + + - name: Fix permission + run: sudo chown -R $(whoami):$(id -ng) .cache/.pre-commit