feat(migrations): add compile-time migration generation #112
Workflow file for this run
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
| # SPDX-FileCopyrightText: 2025 RAprogramm <andrey.rozanov.vl@gmail.com> | |
| # | |
| # SPDX-License-Identifier: MIT | |
| name: Dependabot Auto-merge | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| automerge: | |
| name: Auto-merge Dependabot PRs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if Dependabot PR | |
| id: check | |
| run: | | |
| if [ "${{ github.event.pull_request.user.login }}" = "dependabot[bot]" ]; then | |
| echo "is_dependabot=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "is_dependabot=false" >> $GITHUB_OUTPUT | |
| echo "Not a Dependabot PR, skipping auto-merge" | |
| fi | |
| - name: Fetch Dependabot metadata | |
| if: steps.check.outputs.is_dependabot == 'true' | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Enable auto-merge for minor/patch updates | |
| if: steps.check.outputs.is_dependabot == 'true' && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch') | |
| run: gh pr merge --auto --squash "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Approve patch updates | |
| if: steps.check.outputs.is_dependabot == 'true' && steps.metadata.outputs.update-type == 'version-update:semver-patch' | |
| run: gh pr review --approve "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |