Daily master tag #3
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: Daily master tag | |
| on: | |
| schedule: | |
| # Run daily at 10:00 UTC (after nightly-testing has settled) | |
| - cron: '0 10 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'leanprover-community/mathlib4' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: master | |
| - name: Create daily tag | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="master-$(date -u +%Y-%m-%d)" | |
| if git ls-remote --tags origin "refs/tags/$TAG" | grep -q .; then | |
| echo "Tag $TAG already exists, skipping" | |
| else | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| echo "Created tag $TAG" | |
| fi |