Refresh sqllogictest corpus #25
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: Refresh sqllogictest corpus | |
| on: | |
| schedule: | |
| # Every Monday at 06:00 UTC | |
| - cron: "0 6 * * 1" | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/update-corpus.yml' | |
| - 'Dockerfile' | |
| - 'README.md' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build extractor image | |
| run: docker build -t slt-gen . | |
| - name: Refresh corpus | |
| run: | | |
| rm -rf test | |
| mkdir test | |
| docker run --rm -v "$PWD/test:/work/test" slt-gen | |
| - name: Commit and push changes | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: | | |
| if git status --porcelain | grep .; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add test | |
| git commit -m "Update sqllogictest corpus" | |
| git push | |
| else | |
| echo "No updates; skipping commit" | |
| fi |