cuelang.org/go@v0.13.0/.github/workflows/push_tip_to_trybot.yaml (about)

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