From f6043f2968fc21a7e7492a39e6ce2f21e43c04c8 Mon Sep 17 00:00:00 2001 From: Michael Mendy Date: Mon, 25 May 2026 05:50:42 -0700 Subject: [PATCH] Update repository dispatch workflow action This updates the spec dispatch workflow to use `peter-evans/repository-dispatch@v4` instead of the older v1 action. The workflow still dispatches the same `spec_update` event to the existing downstream repositories, but now explicitly disables default `GITHUB_TOKEN` permissions because remote dispatches are authenticated with `SPEC_UPDATE_TOKEN`. This also sets `fail-fast: false` for the repository matrix so one failed downstream dispatch does not cancel the remaining dispatch attempts, and adds a small `client-payload` containing the source repository, ref, and commit SHA for downstream workflows that want to inspect where the spec update came from. --- .github/workflows/dispatch_spec_update.yml | 28 +++++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dispatch_spec_update.yml b/.github/workflows/dispatch_spec_update.yml index 13767fa..5a7f758 100644 --- a/.github/workflows/dispatch_spec_update.yml +++ b/.github/workflows/dispatch_spec_update.yml @@ -1,21 +1,37 @@ name: Dispatch Spec Update -on: + +on: workflow_dispatch: push: branches: - main +permissions: {} + jobs: - Dispatch: + dispatch: + name: Dispatch spec update to ${{ matrix.repository }} runs-on: ubuntu-latest + strategy: + fail-fast: false matrix: - repository: ['dropbox/dropbox-sdk-python', 'dropbox/dropbox-sdk-js', 'dropbox/dropbox-sdk-dotnet', 'dropbox/dropbox-api-v2-explorer'] + repository: + - dropbox/dropbox-sdk-python + - dropbox/dropbox-sdk-js + - dropbox/dropbox-sdk-dotnet + - dropbox/dropbox-api-v2-explorer + steps: - - name: Dispatch Update - uses: peter-evans/repository-dispatch@v1 + - name: Dispatch spec update + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.SPEC_UPDATE_TOKEN }} repository: ${{ matrix.repository }} event-type: spec_update - \ No newline at end of file + client-payload: >- + { + "repository": "${{ github.repository }}", + "ref": "${{ github.ref }}", + "sha": "${{ github.sha }}" + }