-
Notifications
You must be signed in to change notification settings - Fork 193
61 lines (60 loc) · 1.73 KB
/
pr.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: "Pull Requests"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
jobs:
check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json
generate-files:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.SKIM_RS_BOT_APP_ID }}
private-key: ${{ secrets.SKIM_RS_BOT_PRIVATE_KEY }}
- name: Checkout Git repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
token: ${{ steps.app-token.outputs.token }}
- name: Install correct toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Generate manpage
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask mangen
- name: Generate completions
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask compgen
- name: Push modified files
run: |
git branch -v
git config user.email "[email protected]"
git config user.name "Skim bot"
git commit -am 'chore: generate completions & manpage' || exit 0
git push