Cache test database schema in CI to reduce compute time #1529
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: Labels | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| types: [labeled, unlabeled, opened, reopened] | |
| jobs: | |
| check_product_label: | |
| name: 🏷️ Require a product label | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| steps: | |
| - name: Report product label check | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const labels = context.payload.pull_request.labels.map(l => l.name); | |
| const hasProductLabel = labels.some(l => l.startsWith('product/')); | |
| await github.rest.checks.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| name: 'Product label', | |
| head_sha: context.payload.pull_request.head.sha, | |
| status: 'completed', | |
| conclusion: hasProductLabel ? 'success' : 'failure', | |
| output: { | |
| title: hasProductLabel ? 'Product label present' : 'Missing product label', | |
| summary: hasProductLabel | |
| ? 'A product/ label is present on this PR.' | |
| : 'This PR requires a product/ label before it can be merged.', | |
| }, | |
| }); |