diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a5a70e56eb..ec964f95997 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -451,3 +451,49 @@ jobs: git add nitro-cli.rb git commit -m "🍺 Update nitro formula to ${{ steps.version.outputs.version }}" || exit 0 git push + + update-github-actions: + name: 🔄 Update GitHub Actions + runs-on: ubuntu-latest + needs: [build-nitro-cli] + if: startsWith(github.ref, 'refs/tags/') + strategy: + matrix: + repo: + - nitro-client-publish + - nitro-client-upload + - nitro-client-validate + - nitro-fusion-publish + - nitro-fusion-upload + - nitro-fusion-validate + - nitro-mcp-publish + - nitro-mcp-upload + - nitro-mcp-validate + - nitro-openapi-publish + - nitro-openapi-upload + - nitro-openapi-validate + - nitro-schema-publish + - nitro-schema-upload + - nitro-schema-validate + + steps: + - name: 🏷️ Get release version + run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: 🔐 Create GitHub App token + id: app-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.ACTIONS_APP_ID }} + private-key: ${{ secrets.ACTIONS_APP_PRIVATE_KEY }} + owner: ChilliCream + repositories: ${{ matrix.repo }} + + - name: 🚀 Trigger action repository update workflow + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + gh api --method POST \ + "/repos/ChilliCream/${{ matrix.repo }}/dispatches" \ + -f event_type=update-from-platform \ + -f client_payload[version]="$VERSION"