Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/bump-api-schema-sha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Bump API Schema SHA
on:

# This could be run manually, but general expectation is that this fires from GHA in
# getsentry/sentry-api-schema on changes there. See:
#
# https://develop.sentry.dev/api/public/#build-process

workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
name: "Bump API Schema SHA"
steps:
- uses: actions/checkout@v2
- name: "Bump API Schema SHA"
shell: bash
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
filepath="src/gatsby/utils/resolveOpenAPI.ts"
sha="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
sed -i -e 's|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = "'$SHA'"|g' "$filepath"
git add "$filepath"
git commit -m "Bump API schema to $sha"
git push
13 changes: 0 additions & 13 deletions scripts/bump-api-schema-sha.sh

This file was deleted.