[#58] .forgejo: Add forgejo actions
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
aaa922f600
commit
6bc2038f03
3 changed files with 52 additions and 0 deletions
19
.forgejo/workflows/dco.yaml
Normal file
19
.forgejo/workflows/dco.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: DCO action
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
dco:
|
||||
name: DCO
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.22'
|
||||
- name: Run commit format checker
|
||||
uses: https://git.frostfs.info/TrueCloudLab/dco-go@v3
|
||||
with:
|
||||
from: 'origin/${{ github.event.pull_request.base.ref }}'
|
15
.forgejo/workflows/fmt.yaml
Normal file
15
.forgejo/workflows/fmt.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: Formatters
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
name: Run fmt
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install deps
|
||||
run: |
|
||||
apt update
|
||||
apt install -y clang-format
|
||||
- name: Run fmt
|
||||
run: make fmt
|
18
.forgejo/workflows/pre-commit.yaml
Normal file
18
.forgejo/workflows/pre-commit.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
name: Pre-commit hooks
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
name: Pre-commit
|
||||
env:
|
||||
# Skip pre-commit hooks which are executed by other actions.
|
||||
SKIP: make-fmt
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install deps
|
||||
run: |
|
||||
apt update
|
||||
apt install -y pre-commit
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --all-files --hook-stage manual --color=always
|
Loading…
Reference in a new issue