From dcb4143ec20c67146c9ad79d2fd289779f199d8b Mon Sep 17 00:00:00 2001 From: Marvin Beckers Date: Wed, 15 May 2024 17:54:54 +0200 Subject: [PATCH] ci: add conform workflow and configuration Signed-off-by: Marvin Beckers --- .conform.yaml | 38 ++++++++++++++++++++++++++++++++++ .github/workflows/conform.yaml | 22 ++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .conform.yaml create mode 100644 .github/workflows/conform.yaml diff --git a/.conform.yaml b/.conform.yaml new file mode 100644 index 0000000..4fcf9b1 --- /dev/null +++ b/.conform.yaml @@ -0,0 +1,38 @@ +policies: + - type: commit + spec: + header: + length: 89 + imperative: true + case: lower + invalidLastCharacters: . + dco: true + spellcheck: + locale: US + maximumOfOneCommit: true + conventional: + types: + # build system, releases + - "build" + # changes with no functional effect (e.g. updating dependencies) + - "chore" + # GitHub Actions + - "ci" + # Documentation + - "docs" + # Unit and integration tests + - "test" + scopes: + # everything related to cargo configuration and dependencies + - "cargo" + # all current subcommands in kbs + - "import" + - "label" + - "list" + - "move" + - "prune" + - "remove" + - "shell" + - "use" + - "version" + descriptionLength: 72 diff --git a/.github/workflows/conform.yaml b/.github/workflows/conform.yaml new file mode 100644 index 0000000..0d59292 --- /dev/null +++ b/.github/workflows/conform.yaml @@ -0,0 +1,22 @@ +--- +name: Commit Conformance +on: [workflow_call] + +jobs: + signoff: + runs-on: ubuntu-latest + + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + + - name: Setup main branch without switching current branch + run: git fetch origin main:main + + - name: Conform Action + uses: siderolabs/conform@v0.1.0-alpha.29 + with: + args: "enforce --base-branch=main"