Copy account config schema files from backend to colive alongside the integrations #4588
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: Dependency Wheel Promotion Gate | |
| on: | |
| pull_request_target: | |
| branches: | |
| - master | |
| - 7.*.* | |
| merge_group: | |
| types: [checks_requested] | |
| jobs: | |
| check: | |
| name: Set dependency-wheel-promotion status | |
| if: github.event_name == 'pull_request_target' | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| statuses: write | |
| contents: read | |
| steps: | |
| - name: Check if dependency files changed | |
| id: deps-changed | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const files = await github.paginate(github.rest.pulls.listFiles, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| per_page: 100, | |
| }); | |
| const depPaths = ['agent_requirements.in', '.github/workflows/resolve-build-deps.yaml']; | |
| const depPrefixes = ['.builders/', '.deps/']; | |
| const changed = files.some(f => | |
| depPaths.includes(f.filename) || depPrefixes.some(p => f.filename.startsWith(p)) | |
| ); | |
| core.setOutput('changed', changed ? 'true' : 'false'); | |
| - name: Set fallback dependency-wheel-promotion status | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const sha = context.payload.pull_request.head.sha; | |
| const statuses = await github.paginate(github.rest.repos.listCommitStatusesForRef, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: sha, | |
| per_page: 100, | |
| }); | |
| if (statuses.some(status => status.context === 'dependency-wheel-promotion')) { | |
| core.info(`dependency-wheel-promotion status already exists for ${sha}; leaving it unchanged.`); | |
| return; | |
| } | |
| const changed = '${{ steps.deps-changed.outputs.changed }}' === 'true'; | |
| await github.rest.repos.createCommitStatus({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sha, | |
| state: changed ? 'pending' : 'success', | |
| context: 'dependency-wheel-promotion', | |
| description: changed | |
| ? 'Wheels must be promoted to stable before merge. Run: ddev dep promote <PR_URL>' | |
| : 'No dependency changes; promotion not required.', | |
| }); | |
| merge-queue: | |
| name: Set dependency-wheel-promotion status for merge queue | |
| if: github.event_name == 'merge_group' | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| statuses: write | |
| contents: read | |
| steps: | |
| - name: Set dependency-wheel-promotion status to success | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| await github.rest.repos.createCommitStatus({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sha: context.sha, | |
| state: 'success', | |
| context: 'dependency-wheel-promotion', | |
| description: 'Promotion requirement was already validated on the PR head.', | |
| }); |