Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: policy check workflows #12

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/corporate-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Canonical policy checks
on:
pull_request:
workflow_call:

jobs:
cla-check:
runs-on: ubuntu-latest
steps:
- name: Check if CLA signed
uses: canonical/has-signed-canonical-cla@v1
18 changes: 18 additions & 0 deletions .github/workflows/team-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Team policy checks
on:
pull_request:
workflow_call:

jobs:
conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: conventional commits
uses: webiny/action-conventional-commits@v1.3.0
with:
allowed-commit-types: "build,chore,ci,docs,feat,fix,perf,refactor,style,test"
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ Some of these automations are provided as [Reusable workflows](https://docs.gith
For these workflows, you can embed them in a workflow you run at the `job` level.
Examples are provided below.

## Policy checkers

Two reusable workflows combine to check that a commit matches Canonical and team
policies for PRs to our repositories. Right now, these checks are:

- [CLA check](https://github.com/canonical/has-signed-canonical-cla)
- [Commit message styles](https://github.com/canonical/starbase/blob/main/HACKING.rst#commits).

### Usage

```
name: Policy
on: [pull_request]

jobs:
company:
uses: canonical/starflow/.github/workflows/corporate-policy.yaml@main
team:
uses: canonical/starflow/.github/workflows/team-policy.yaml@main

```

## Python security scanner

The Python security scanner workflow uses several tools (trivy, osv-scanner) to scan a
Expand Down
Loading