-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(github-actions-usage): Add README
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# GitHub Actions Usage | ||
|
||
This app, deployed as an AWS Lambda, tracks which GitHub Actions are in use across all repositories in the organisation. | ||
|
||
## How it works | ||
1. Get all records from the `github_workflows` table | ||
2. For each record returned, parse the `contents` field | ||
1. If the field is empty, log a message | ||
2. Use [Ajv](https://ajv.js.org/) to validate the `contents` field against a [schema](https://json.schemastore.org/github-workflow.json) published by https://www.schemastore.org/json/ [^1] | ||
3. If validation fails, log a message | ||
3. Extract the `uses` string from the `contents` | ||
4. Save results to database | ||
|
||
## Updating the schema | ||
The [schema](./src/schema/github-workflow.json) might need updating from time to time. | ||
|
||
To do this, run the following, and commit the resulting file: | ||
|
||
```bash | ||
npm -w github-actions-usage run download-github-workflow-schema | ||
``` |