-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.21 KB
/
callable-check-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: API Check
on: workflow_call
jobs:
check-api:
name: Check for unexpected API changes
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-data/.github/actions/node-and-build
- name: Run checks
working-directory: ./amplify-data
run: npm run check:api
- name: API Check Instructions
if: failure()
run: |
echo
echo "Oh no!! The API Check Failed!"
echo
echo "You probably have API changes that are not documented in this PR. If this is the case, you have two options."
echo
echo "Option 1: Revert the API changes. (If API/docstring changes were not intended.)"
echo "Option 2: Update the API docs by running the following from the repository root:"
echo
echo "npm run build && npm run docs"
echo
echo "Then commit and push the changes."
echo
exit 1