diff --git a/.github/workflows/private-ci.yml b/.github/workflows/private-ci.yml index 64de345256..bec8120d7e 100644 --- a/.github/workflows/private-ci.yml +++ b/.github/workflows/private-ci.yml @@ -16,7 +16,7 @@ on: - "*" permissions: - statuses: write + contents: write # For repository dispatch jobs: trigger: @@ -26,14 +26,14 @@ jobs: - name: Trigger Private CI run: | PAYLOAD='{"event_type":"cross-repo-ci","client_payload":{"target":"${{ github.repository_owner }}/lowrisc-private-ci/master/test.yml","sha":"${{ github.event.pull_request.head.sha || github.sha }}"' - if [ -n "${{ github.event.pull_request.number }}" ]; then - PAYLOAD+=',"pull_request":${{ github.event.pull_request.number }}"' + if [[ -n "${{ github.event.pull_request.number }}" ]]; then + PAYLOAD+=',"pull_request":${{ github.event.pull_request.number }}' fi PAYLOAD+='}}' - curl -L \ + curl -fL \ -X POST \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ github.token }}>" \ + -H "Authorization: Bearer ${{ github.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/${{ github.repository }}/dispatches \ -d "$PAYLOAD"