-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (54 loc) · 1.7 KB
/
noneflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: NoneFlow
on:
issues:
types: [opened, reopened, edited]
pull_request_target:
types: [closed]
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
jobs:
noneflow:
runs-on: ubuntu-latest
name: noneflow
env:
store-repo: nonebot/noneflow-test
registry-repo: nonebot/noneflow-test
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_KEY }}
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: .cache/.pre-commit
key: noneflow-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: NoneFlow
uses: docker://ghcr.io/nonebot/noneflow:main
with:
config: >
{
"base": "master",
"plugin_path": "assets/plugins.json",
"bot_path": "assets/bots.json",
"adapter_path": "assets/adapters.json",
"registry_repository": "${{ env.registry-repo }}",
"store_repository": "${{ env.store-repo }}"
}
env:
APP_ID: ${{ secrets.APP_ID }}
PRIVATE_KEY: ${{ secrets.APP_KEY }}
PRE_COMMIT_HOME: /github/workspace/.cache/.pre-commit
DOCKER_IMAGES_VERSION: main
- name: Fix permission
run: sudo chown -R $(whoami):$(id -ng) .cache/.pre-commit