Repository navigation
[8.0.0 Cherry-pick] Validate localized authentication resources in Abstractions builds #6085
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
| ################################################################################# | |
| # Licensed to the .NET Foundation under one or more agreements. # | |
| # The .NET Foundation licenses this file to you under the MIT license. # | |
| # See the LICENSE file in the project root for more information. # | |
| ################################################################################# | |
| # | |
| # Check Milestone | |
| # | |
| # Validates that every pull request has an open milestone assigned, that | |
| # milestones on PRs targeting main match SqlClientNextVersion, and that the | |
| # milestone is consistent with the branch the PR targets. | |
| # | |
| # Milestones map to release branches by major.minor: | |
| # | |
| # * "7.0.3" -> release/7.0 exists -> the PR must target release/7.0. | |
| # * "7.1.0" -> release/7.1 does not exist and it is the earliest configured | |
| # unbranched series -> the PR must target main. | |
| # * "8.0.0-preview1" -> release/8.0 does not exist, but 7.1 is still the | |
| # active unbranched series -> the PR cannot target main yet. | |
| # | |
| # See .github/scripts/check-milestone-branch.sh for the full rule set. | |
| # | |
| # Exception: default-branch PRs changing only release-notes/** or CHANGELOG.md | |
| # still require an open milestone, but skip branch and next-version rules. | |
| # Both jobs use is-release-notes-only.cjs to verify the complete file set, | |
| # including previous paths for renames. API errors/incomplete data fail closed. | |
| # | |
| # Cutting release/X.Y flips the expected target for X.Y.* milestones but emits | |
| # no pull request activity. recheck-milestones.yml reconciles the already open | |
| # PRs that the new branch invalidates. | |
| # | |
| ################################################################################# | |
| name: Check Milestone | |
| on: | |
| pull_request: | |
| # The 'edited' type covers base branch changes, so retargeting a PR (manually, | |
| # or automatically when a stacked PR's parent merges) re-runs this check. | |
| types: [opened, reopened, edited, synchronize, milestoned, demilestoned] | |
| jobs: | |
| check-milestone: | |
| name: Validate milestone | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: read | |
| pull-requests: read | |
| steps: | |
| - name: Check milestone is set | |
| if: github.event.pull_request.milestone == null | |
| run: | | |
| echo "::error::This PR does not have a milestone set. Please assign a milestone before merging." | |
| exit 1 | |
| - name: Check milestone is open | |
| if: github.event.pull_request.milestone != null && github.event.pull_request.milestone.state != 'open' | |
| run: | | |
| echo "::error::Milestone '${{ github.event.pull_request.milestone.title }}' is ${{ github.event.pull_request.milestone.state }}. Please assign an open milestone." | |
| exit 1 | |
| - name: Checkout branch check inputs | |
| if: github.event.pull_request.milestone != null | |
| uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: .github/scripts | |
| sparse-checkout-cone-mode: false | |
| - name: Classify release-notes-only changes | |
| id: release-notes | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const classify = require('./.github/scripts/is-release-notes-only.cjs'); | |
| return await classify({ github, context, core }); | |
| - name: Check milestone matches target branch | |
| if: github.event.pull_request.milestone != null && steps.release-notes.outputs.result != 'true' | |
| env: | |
| # Pass PR data via env to avoid script injection from milestone text. | |
| MILESTONE_TITLE: ${{ github.event.pull_request.milestone.title }} | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash "${GITHUB_WORKSPACE}/.github/scripts/check-milestone-branch.sh" | |
| check-milestone-version: | |
| name: Check milestone matches next SqlClient version | |
| if: github.event.pull_request.milestone != null | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Checkout version check inputs | |
| uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github/scripts | |
| src/Microsoft.Data.SqlClient/Versions.props | |
| sparse-checkout-cone-mode: false | |
| - name: Classify release-notes-only changes | |
| id: release-notes | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const classify = require('./.github/scripts/is-release-notes-only.cjs'); | |
| return await classify({ github, context, core }); | |
| - name: Validate milestone version | |
| if: steps.release-notes.outputs.result != 'true' | |
| env: | |
| MILESTONE_TITLE: ${{ github.event.pull_request.milestone.title }} | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| run: bash "${GITHUB_WORKSPACE}/.github/scripts/check-milestone-version.sh" |