| # Generated by internal/ci/ci_tool.cue; do not edit |
| |
| name: Test Dispatch |
| on: |
| - repository_dispatch |
| jobs: |
| start: |
| if: ${{ startsWith(github.event.action, 'Build for refs/changes/') }} |
| runs-on: ubuntu-18.04 |
| defaults: |
| run: |
| shell: bash |
| steps: |
| - name: Write the gitcookies file |
| run: echo "${{ secrets.gerritCookie }}" > ~/.gitcookies |
| - name: Update Gerrit CL message with starting message |
| run: 'curl -f -s -H "Content-Type: application/json" --request POST --data ''{"message":"Started |
| the build... see progress at ${{ github.event.repository.html_url }}/actions/runs/${{ |
| github.run_id }}"}'' -b ~/.gitcookies https://cue-review.googlesource.com/a/changes/${{ |
| github.event.client_payload.changeID }}/revisions/${{ github.event.client_payload.commit |
| }}/review' |
| - name: Checkout ref |
| run: |- |
| mkdir tmpgit |
| cd tmpgit |
| git init |
| git config user.name cueckoo |
| git config user.email cueckoo@gmail.com |
| git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} | base64)" |
| git fetch https://cue-review.googlesource.com/cue ${{ github.event.client_payload.ref }} |
| git checkout -b ci/${{ github.event.client_payload.changeID }}/${{ github.event.client_payload.commit }} FETCH_HEAD |
| git push https://github.com/cuelang/cue ci/${{ github.event.client_payload.changeID }}/${{ github.event.client_payload.commit }} |