Update Nightly Testing #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Nightly Testing | |
| on: | |
| schedule: | |
| - cron: '0 9 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: nightly-testing | |
| token: ${{ secrets.UNICODE_BASIC_TOKEN }} | |
| - name: install jq | |
| uses: dcarbone/install-jq-action@v3 | |
| - name: set user | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor_id}}+${{ github.actor }}@users.noreply.github.com" | |
| - name: merge main | |
| run: | | |
| git fetch origin | |
| git merge origin/main --strategy-option ours --no-commit --allow-unrelated-histories | |
| - name: update lean-toolchain | |
| id: toolchain-tag | |
| run: | | |
| LEAN_TAG=$(curl -s "https://api.github.com/repos/leanprover/lean4-nightly/releases" | jq -r '.[0].tag_name') | |
| echo "lean_tag=$LEAN_TAG" >> $GITHUB_OUTPUT | |
| echo "leanprover/lean4:$LEAN_TAG" > lean-toolchain | |
| git add lean-toolchain | |
| - name: commit and push | |
| run: | | |
| git commit -m "chore: update toolchain ${{ steps.toolchain-tag.outputs.lean_tag }}" | |
| git push origin nightly-testing |