Skip to content
Latchkey

Conventional commits workflow (ory/oathkeeper)

The Conventional commits workflow from ory/oathkeeper, explained and optimized by Latchkey.

B

CI health: B - good

Point runs-on at Latchkey and get job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: ory/oathkeeper.github/workflows/conventional_commits.ymlLicense Apache-2.0View source

What it does

This is the Conventional commits workflow from the ory/oathkeeper repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/conventional_commits.yml

name: Conventional commits

# This GitHub CI Action enforces that pull request titles follow conventional commits.
# More info at https://www.conventionalcommits.org.
#
# The Ory-wide defaults for commit titles and scopes are below.
# Your repository can add/replace elements via a configuration file at the path below.
# More info at https://github.com/ory/ci/blob/master/conventional_commit_config/README.md

on:
  pull_request_target:
    types:
      - edited
      - opened
      - ready_for_review
      - reopened
  # pull_request: # for debugging, uses config in local branch but supports only Pull Requests from this repo

jobs:
  main:
    name: Validate PR title
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - id: config
        uses: ory/ci/conventional_commit_config@master
        with:
          config_path: .github/conventional_commits.json
          default_types: |
            feat
            fix
            revert
            docs
            style
            refactor
            test
            build
            autogen
            security
            ci
            chore
          default_scopes: |
            deps
            docs
          default_require_scope: false
      - uses: amannn/action-semantic-pull-request@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          types: ${{ steps.config.outputs.types }}
          scopes: ${{ steps.config.outputs.scopes }}
          requireScope: ${{ steps.config.outputs.requireScope }}
          subjectPattern: ^(?![A-Z]).+$
          subjectPatternError: |
            The subject should start with a lowercase letter, yours is uppercase:
            "{subject}"

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/conventional_commits.yml
 
name: Conventional commits
 
# This GitHub CI Action enforces that pull request titles follow conventional commits.
# More info at https://www.conventionalcommits.org.
#
# The Ory-wide defaults for commit titles and scopes are below.
# Your repository can add/replace elements via a configuration file at the path below.
# More info at https://github.com/ory/ci/blob/master/conventional_commit_config/README.md
 
on:
  pull_request_target:
    types:
      - edited
      - opened
      - ready_for_review
      - reopened
  # pull_request: # for debugging, uses config in local branch but supports only Pull Requests from this repo
 
jobs:
  main:
    timeout-minutes: 30
    name: Validate PR title
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v7
      - id: config
        uses: ory/ci/conventional_commit_config@master
        with:
          config_path: .github/conventional_commits.json
          default_types: |
            feat
            fix
            revert
            docs
            style
            refactor
            test
            build
            autogen
            security
            ci
            chore
          default_scopes: |
            deps
            docs
          default_require_scope: false
      - uses: amannn/action-semantic-pull-request@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          types: ${{ steps.config.outputs.types }}
          scopes: ${{ steps.config.outputs.scopes }}
          requireScope: ${{ steps.config.outputs.requireScope }}
          subjectPattern: ^(?![A-Z]).+$
          subjectPatternError: |
            The subject should start with a lowercase letter, yours is uppercase:
            "{subject}"
 

What changed

2 third-party actions are referenced by a movable tag. Pin them to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow