This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.45 KB
/
check.yaml
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: Check code
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
jobs:
Lint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v3
with:
token: ${{ secrets.COMMIT_TOKEN }}
- uses: cachix/install-nix-action@v15
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Lint code
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Commit code
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: lint code, `GithubCI`"
branch: ${{ github.head_ref }}
Format:
runs-on: ubuntu-latest
needs: [Lint]
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v3
with:
token: ${{ secrets.COMMIT_TOKEN }}
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Format code
run: nix-shell --command "just format"
- name: Commit code
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: format code, `GithubCI`"
branch: ${{ github.head_ref }}