chore: run migration patch on slim runner #7
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: Apply v3 migrations follow-up fixes | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| branches: [master] | |
| push: | |
| branches: | |
| - agent/fix-v3-migration-safety-and-rails-compat | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: agent-fix-v3-migrations-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| apply: | |
| if: github.actor != 'github-actions[bot]' | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out source branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| fetch-depth: 1 | |
| persist-credentials: true | |
| - name: Apply and commit fixes | |
| shell: bash | |
| env: | |
| TARGET_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| run: | | |
| base64 --decode .github/agent_fix_v3_migrations.py.gz.b64 | gzip --decompress --stdout > /tmp/agent_fix_v3_migrations.py | |
| python3 /tmp/agent_fix_v3_migrations.py | |
| git diff --check | |
| rm -f .github/agent_fix_v3_migrations.py.gz.b64 | |
| rm -f .github/workflows/agent-fix-v3-migrations.yml | |
| git config user.name 'github-actions[bot]' | |
| git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
| git add vlib/v3/migrations/migrations.v \ | |
| vlib/v3/migrations/schema.v \ | |
| vlib/v3/migrations/migrations_test.v \ | |
| vlib/v3/migrations/README.md \ | |
| .github/agent_fix_v3_migrations.py.gz.b64 \ | |
| .github/workflows/agent-fix-v3-migrations.yml | |
| git commit -m 'v3: harden ORM migrations and align Rails history' | |
| git push origin HEAD:${TARGET_BRANCH} |