-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.13 KB
/
callable-check-changeset.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
35
36
name: API Check
on: workflow_call
jobs:
check-api:
name: Check for presense of changeset
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
# check out full history
fetch-depth: 0
- name: Setup node and build the repository
uses: ./amplify-data/.github/actions/node-and-build
- name: Run checks
working-directory: ./amplify-data
run: npx changeset status --since origin/main
- name: API Check Instructions
if: failure()
run: |
echo
echo "Oh no!! The Changeset Check Failed!"
echo
echo "Your PR does not contain a changeset."
echo
echo "Run `npx changeset` to add one."
echo
echo "If this change doesn't need a release, run `npx changeset add --empty`"
echo
echo "Then commit and push the changes."
echo
exit 1