Skip to content

Commit 46b33b0

Browse files
authored
Merge pull request #247 from checkly/immanuel/heartbeat-api-spec
feat: add heartbeat for api spec
2 parents a52fc8b + 20a224b commit 46b33b0

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

.github/workflows/update-api-spec.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,51 @@ jobs:
1010
update-api-spec:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 10
13-
13+
1414
permissions:
1515
contents: write
1616
pull-requests: write
17-
17+
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
2121
with:
2222
token: ${{ secrets.GITHUB_TOKEN }}
23-
23+
2424
- name: Set up Node.js
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: '20'
28-
28+
2929
- name: Install dependencies
3030
run: |
3131
npm install -g swagger2openapi
3232
npm install -g mintlify
33-
33+
3434
- name: Configure git
3535
run: |
3636
git config user.name "API Spec Updater"
3737
git config user.email "noreply@checkly.com"
38-
38+
3939
- name: Fetch and update API specification
4040
run: |
4141
# Store current spec hash for comparison
4242
CURRENT_HASH=$(sha256sum api-reference/openapi.json | cut -d' ' -f1)
43-
43+
4444
# Run the update script
4545
./update-api-spec.sh
46-
46+
4747
# Check if spec actually changed
4848
NEW_HASH=$(sha256sum api-reference/openapi.json | cut -d' ' -f1)
49-
49+
5050
if [ "$CURRENT_HASH" != "$NEW_HASH" ]; then
5151
echo "API specification has changed"
5252
echo "spec_changed=true" >> $GITHUB_ENV
5353
else
5454
echo "API specification is unchanged"
5555
echo "spec_changed=false" >> $GITHUB_ENV
5656
fi
57-
57+
5858
- name: Commit and Push Changes
5959
if: env.spec_changed == 'true'
6060
run: |
@@ -66,8 +66,12 @@ jobs:
6666
6767
# Push directly to main
6868
git push origin main
69-
69+
7070
- name: Report no changes
7171
if: env.spec_changed == 'false'
7272
run: |
73-
echo "✅ API specification is up to date - no changes needed"
73+
echo "✅ API specification is up to date - no changes needed"
74+
75+
- name: Ping Checkly
76+
run: curl -fsS --retry 3 https://ping.checklyhq.com/ad576f21-3f3e-4a6a-b8e4-67fd0f6ed92d
77+

0 commit comments

Comments
 (0)