Updates language around Prefect server and Cloud in the docs #115
Workflow file for this run
This file contains 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
# For automated releases, we should ensure we don't have PRs in the Uncategorized section. | |
# Uncategorized PRs can be prevented by adding the necessary label. | |
name: Ensure PR Label | |
on: | |
pull_request: | |
types: [opened, edited, labeled, unlabeled, synchronize, reopened] | |
jobs: | |
ensure-label: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
- name: Install yq | |
run: | | |
pip install yq | |
- name: Ensure a required label is present | |
id: check-label | |
run: | | |
found=false | |
for required_label in $(yq -r '(.changelog.categories[] | select(.title != "Uncategorized") | .labels[]), (.changelog.exclude.labels[])' .github/release.yml); do | |
for pr_label in $(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH"); do | |
if [[ "$required_label" == "$pr_label" ]]; then | |
found=true | |
break 2 | |
fi | |
done | |
done | |
echo "label_exists=$found" >> $GITHUB_OUTPUT | |
- name: Fail if no required labels are found | |
if: steps.check-label.outputs.label_exists == 'false' | |
run: | | |
echo "None of the required labels are applied to the PR." | |
exit 1 |