From f146e89509892991018c1dc0c8a76cbd9fe48c70 Mon Sep 17 00:00:00 2001 From: Aleksey Savchuk Date: Mon, 2 Sep 2024 16:12:29 +0300 Subject: [PATCH] [#58] .forgejo: Add forgejo actions Signed-off-by: Aleksey Savchuk --- .forgejo/workflows/dco.yaml | 21 +++++++++++++++++++++ .forgejo/workflows/pre-commit.yaml | 15 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .forgejo/workflows/dco.yaml create mode 100644 .forgejo/workflows/pre-commit.yaml diff --git a/.forgejo/workflows/dco.yaml b/.forgejo/workflows/dco.yaml new file mode 100644 index 0000000..7c5af84 --- /dev/null +++ b/.forgejo/workflows/dco.yaml @@ -0,0 +1,21 @@ +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 }}' diff --git a/.forgejo/workflows/pre-commit.yaml b/.forgejo/workflows/pre-commit.yaml new file mode 100644 index 0000000..6635dc4 --- /dev/null +++ b/.forgejo/workflows/pre-commit.yaml @@ -0,0 +1,15 @@ +name: Pre-commit hooks +on: [pull_request] + +jobs: + precommit: + name: Pre-commit + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Install deps + run: | + apt update + apt install -y pre-commit clang-format + - name: Run pre-commit + run: pre-commit run --all-files --hook-stage manual --color=always