Skip to content

Commit

Permalink
feat: add ADR TOC check
Browse files Browse the repository at this point in the history
feat: add docs to README
  • Loading branch information
coreone committed Jan 26, 2024
1 parent c39bb4a commit 7d9ce2c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/adr-check-toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'on':
workflow_call:
inputs:
jobs_run_on:
default: ubuntu-latest
description: The runner group on which jobs will run.
required: false
type: string
timeout_minutes:
description: The maximum time (in minutes) for a job to run.
default: 5
required: false
type: number
working_directory:
description: The working directory where all jobs should be executed.
default: '.'
required: false
type: string

jobs:
adr-check-toc:
defaults:
run:
working-directory: ${{ inputs.working_directory }}
runs-on: ${{ inputs.jobs_run_on }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install additional packages
run: sudo apt-get install -y adr-tools
- name: 'Test for uncommitted changes'
run: adr generate toc | diff README.md -
timeout-minutes: ${{ inputs.timeout_minutes }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ parameters that can be passed with `with:` from calling repositories:
* `working_directory`: The working directory where all jobs should be executed.
Default: `.`

### adr-check-toc.yaml

This workflow will run the `adr generate toc` command using
[adr](https://github.com/npryce/adr-tools). This check makes sure PRs haven't forgotten
to run this command as part of their commits.

### conventional-commit.yaml

This workflow will run the
Expand Down

0 comments on commit 7d9ce2c

Please sign in to comment.