| # Generated by internal/ci/ci_tool.cue; do not edit |
| |
| name: Scheduled repo mirror |
| on: |
| schedule: |
| - cron: '*/30 * * * *' |
| jobs: |
| mirror: |
| runs-on: ubuntu-18.04 |
| defaults: |
| run: |
| shell: bash |
| steps: |
| - name: Checkout code |
| uses: actions/checkout@v2 |
| - name: Mirror Gerrit to GitHub |
| run: |- |
| cd _scripts |
| docker run --rm -v $PWD/cache:/root/copybara/cache -v $PWD:/usr/src/app --entrypoint="" cueckoo/copybara:afc4ae03eed00b0c9d7415141cd1b5dfa583da7c bash -c " \ |
| set -eu; \ |
| echo \"${{ secrets.gerritCookie }}\" > ~/.gitcookies; \ |
| chmod 600 ~/.gitcookies; \ |
| git config --global user.name cueckoo; \ |
| git config --global user.email cueckoo@gmail.com; \ |
| git config --global http.cookiefile \$HOME/.gitcookies; \ |
| echo https://cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }}@github.com > ~/.git-credentials; \ |
| chmod 600 ~/.git-credentials; \ |
| java -jar /opt/copybara/copybara_deploy.jar migrate copy.bara.sky github; \ |
| " |