From d2acffcdb874af986dfd362edcbbdfbb4556223c Mon Sep 17 00:00:00 2001 From: Zac Farrell Date: Wed, 11 Mar 2026 20:14:53 -0700 Subject: [PATCH] fix: use app token for private repo access, drop repository_dispatch --- .github/workflows/regenerate.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regenerate.yml b/.github/workflows/regenerate.yml index 586d06b..7d5c17b 100644 --- a/.github/workflows/regenerate.yml +++ b/.github/workflows/regenerate.yml @@ -1,8 +1,6 @@ name: Regenerate Client on: - repository_dispatch: - types: [openapi-updated] workflow_dispatch: jobs: @@ -11,9 +9,22 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v2 + with: + app-id: 3060111 + private-key: ${{ secrets.HOTDATA_AUTOMATION_PRIVATE_KEY }} + owner: hotdata-dev + - name: Fetch merged OpenAPI spec + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | - curl -sL https://raw.githubusercontent.com/hotdata-dev/www.hotdata.dev/main/api/openapi.yaml \ + curl -sS -f -L \ + -H "Accept: application/vnd.github.v3.raw" \ + -H "Authorization: Bearer $GH_TOKEN" \ + https://api.github.com/repos/hotdata-dev/www.hotdata.dev/contents/api/openapi.yaml \ -o openapi.yaml - name: Clean existing source