luigidematteis opened a new pull request, #90:
URL: https://github.com/apache/openserverless-operator/pull/90

   ## Summary
   
   - Replace the `peter-evans/repository-dispatch@v3` action in 
`trigger-testing.yaml` with a direct `gh api` call to `POST 
/repos/{owner}/openserverless-testing/dispatches`
   - The receiving workflow (`operator-pr-test.yaml` in 
`openserverless-testing`) requires **no changes** — the `repository_dispatch` 
event payload structure is identical
   
   ## Context
   
   The `peter-evans/repository-dispatch@v3` action is not in Apache's allowed 
actions list, causing the `Trigger Testing` workflow to fail with HTTP 403. 
Since this action is just a thin wrapper around the GitHub REST API, replacing 
it with `gh api` (pre-installed on all GitHub-hosted runners) produces the 
exact same `repository_dispatch` event without requiring any third-party action.
   
   ## Changes
   
   **File:** `.github/workflows/trigger-testing.yaml`
   
   The last step of the `dispatch` job changes from:
   ```yaml
   - name: Dispatch to testing repo
     uses: peter-evans/repository-dispatch@v3
     with:
       token: ${{ secrets.OPENSERVERLESS_TESTING_PAT }}
       ...
   ```
   To:
   ```yaml
   - name: Dispatch to testing repo
     env:
       GH_TOKEN: ${{ secrets.OPENSERVERLESS_TESTING_PAT }}
     run: |
       gh api repos/${{ github.repository_owner 
}}/openserverless-testing/dispatches \
         -X POST \
         -f event_type=operator-pr-test \
         -f 'client_payload[pr_number]=...' \
         ...
   ```
   
   All other steps remain unchanged. No new secrets required 
(`OPENSERVERLESS_TESTING_PAT` is the same).
   
   ## Test plan
   
   - [x] Deployed modified workflow to `h3x-eilidh/openserverless-operator` fork
   - [x] Created PR, commented `/testing k3s-amd`
   - [x] Verified operator dispatch workflow completed successfully ([run 
23086906413](https://github.com/h3x-eilidh/openserverless-operator/actions/runs/23086906413))
   - [x] Verified testing repo received dispatch and ran `Operator PR Test` 
([run 
23086908915](https://github.com/h3x-eilidh/openserverless-testing/actions/runs/23086908915))
   - [x] Confirmed all 5 payload fields transmitted correctly (pr_number, 
pr_ref, pr_sha, operator_repo, platform)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to