From aebbc75dea4036fbc49dc600feb7a688bd2ae2e5 Mon Sep 17 00:00:00 2001 From: Vini Brasil Date: Wed, 16 Apr 2025 10:18:26 -0300 Subject: [PATCH] Notify downstream repo of changes (#2615) * Notify downstream repo of changes * Add permissions block --- .github/workflows/notify-downstream.yml | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/notify-downstream.yml diff --git a/.github/workflows/notify-downstream.yml b/.github/workflows/notify-downstream.yml new file mode 100644 index 000000000..11eab8d2b --- /dev/null +++ b/.github/workflows/notify-downstream.yml @@ -0,0 +1,33 @@ +name: Notify Downstream + +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + notify-downstream: + runs-on: ubuntu-latest + + steps: + - name: Generate GitHub App token + id: app-token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.OSS_SYNC_APP_ID }} + private_key: ${{ secrets.OSS_SYNC_APP_PRIVATE_KEY }} + + - name: Notify Repo B + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.app-token.outputs.token }} + repository: ${{ secrets.OSS_SYNC_DOWNSTREAM_REPO }} + event-type: upstream-commit + client-payload: | + { + "commit_sha": "${{ github.sha }}" + } +