Skip to content

Commit 91f8d4e

Browse files
authored
Merge f59b2b0 into 06be14d
2 parents 06be14d + f59b2b0 commit 91f8d4e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
Do you check in dependency packages or build artefacts? If yes this GitHub Action helps you ensure they are not out-of-sync. Examples:
77

8-
1. Say we set up to [run Yarn offline](https://classic.yarnpkg.com/blog/2016/11/24/offline-mirror/) and we check in Yarn offline mirror. We want to make sure the offline mirror is in sync with the dependencies declared in the `package.json`. We can set up a GitHub Workflow to run `yarn install` and then use this Action to check if the offline mirror is changed.
9-
2. Say we generate TypeScript type definitions from [JSON Schemas](https://json-schema.org/). The generated TypeScript files are part of the codebase. We want to make sure people remember to regenerate these files when they modify any JSON Schema. We can use a GitHub Workflow to run the code generation and then use this GitHub Action to check if the files are changed. If they are changed this Action can commit the changes and add them to the Pull Request.
8+
1. Say we run [Prettier](https://prettier.io/) or [`oxfmt`](https://github.com/oxc-project/oxc/tree/main/crates/oxfmt) in CI and require developers to commit any formatting updates. We can run the formatter and then use this Action to fail the workflow, request changes, or auto-commit the formatting diff when files are out of sync.
9+
2. Say we set up to [run Yarn offline](https://classic.yarnpkg.com/blog/2016/11/24/offline-mirror/) and we check in Yarn offline mirror. We want to make sure the offline mirror is in sync with the dependencies declared in the `package.json`. We can set up a GitHub Workflow to run `yarn install` and then use this Action to check if the offline mirror is changed.
10+
3. Say we generate TypeScript type definitions from [JSON Schemas](https://json-schema.org/). The generated TypeScript files are part of the codebase. We want to make sure people remember to regenerate these files when they modify any JSON Schema. We can use a GitHub Workflow to run the code generation and then use this GitHub Action to check if the files are changed. If they are changed this Action can commit the changes and add them to the Pull Request.
1011

1112
## Usage
1213

@@ -28,8 +29,8 @@ jobs:
2829

2930
- name: Build
3031
run: |
31-
# replace the following line with the real build script
32-
touch some-build-artefact-newly-generated-in-the-build-process
32+
yarn prettier -w .
33+
yarn graphql-codegen --config codegen.ts
3334
3435
- uses: CatChen/check-git-status-action@v2
3536
with:

0 commit comments

Comments
 (0)