-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (35 loc) · 971 Bytes
/
lgtm.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
name: LGTM
on:
pull_request_review:
types: [submitted]
jobs:
approved:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout 🛎
uses: actions/checkout@v2
- name: Cache cargo packages 💾
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust 🦀
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build cli 🚧
uses: actions-rs/cargo@v1
with:
command: build
args: --package cli
- name: LGTM
run: gh pr comment ${{ github.event.pull_request.number }} --body "$(cargo run --package cli)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}