mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 09:38:21 +08:00
👷 CI: 缓存 NoneFlow 所需的 pre-commit hooks (#2104)
This commit is contained in:
parent
7d3c7c4933
commit
30dbd270a6
12
.github/workflows/noneflow.yml
vendored
12
.github/workflows/noneflow.yml
vendored
@ -12,7 +12,7 @@ on:
|
|||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
plugin_test:
|
plugin_test:
|
||||||
@ -72,6 +72,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
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
|
- name: NoneFlow
|
||||||
uses: docker://ghcr.io/nonebot/noneflow:latest
|
uses: docker://ghcr.io/nonebot/noneflow:latest
|
||||||
with:
|
with:
|
||||||
@ -88,3 +94,7 @@ jobs:
|
|||||||
PLUGIN_TEST_METADATA: ${{ needs.plugin_test.outputs.metadata }}
|
PLUGIN_TEST_METADATA: ${{ needs.plugin_test.outputs.metadata }}
|
||||||
APP_ID: ${{ secrets.APP_ID }}
|
APP_ID: ${{ secrets.APP_ID }}
|
||||||
PRIVATE_KEY: ${{ secrets.APP_KEY }}
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user