cuelang.org/go@v0.10.1/.github/workflows/push_tip_to_trybot.yml (about)

     1  # Code generated internal/ci/ci_tool.cue; DO NOT EDIT.
     2  
     3  name: Push tip to trybot
     4  "on":
     5    push:
     6      branches:
     7        - master
     8        - release-branch.*
     9  concurrency: push_tip_to_trybot
    10  jobs:
    11    push:
    12      runs-on: ubuntu-22.04
    13      defaults:
    14        run:
    15          shell: bash
    16      if: ${{github.repository == 'cue-lang/cue'}}
    17      steps:
    18        - name: Write netrc file for cueckoo Gerrithub
    19          run: |-
    20            cat <<EOD > ~/.netrc
    21            machine review.gerrithub.io
    22            login cueckoo
    23            password ${{ secrets.CUECKOO_GERRITHUB_PASSWORD }}
    24            EOD
    25            chmod 600 ~/.netrc
    26        - name: Push tip to trybot
    27          run: |-
    28            mkdir tmpgit
    29            cd tmpgit
    30            git init -b initialbranch
    31            git config user.name cueckoo
    32            git config user.email cueckoo@gmail.com
    33            git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} | base64)"
    34            git remote add origin https://review.gerrithub.io/a/cue-lang/cue
    35            git remote add trybot https://github.com/cue-lang/cue-trybot
    36  
    37            git fetch origin "${{ github.ref }}"
    38  
    39            success=false
    40            for try in {1..20}; do
    41            	 echo "Push to trybot try $try"
    42            	 if git push -f trybot "FETCH_HEAD:${{ github.ref }}"; then
    43            		  success=true
    44            		  break
    45            	 fi
    46            	 sleep 1
    47            done
    48            if ! $success; then
    49            	 echo "Giving up"
    50            	 exit 1
    51            fi