Skip to content

chore(deps): bump arnested/go-version-action from 1.1.21 to 1.1.22 #792

chore(deps): bump arnested/go-version-action from 1.1.21 to 1.1.22

chore(deps): bump arnested/go-version-action from 1.1.21 to 1.1.22 #792

Workflow file for this run

name: Label Checker
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
permissions:
issues: read
pull-requests: read
env:
VALID_SEMVER_LABELS: norelease,release:major,release:minor,release:patch
jobs:
check_labels:
name: Check labels
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v7
with:
script: |
const validLabels = process.env.VALID_SEMVER_LABELS.split(",");
const { data: labelResultList } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const prLabels = labelResultList.map(label => label.name);
const semverLabels = prLabels.filter(value => validLabels.includes(value));
core.info(`Valid labels: ${validLabels.join(" | ")}`);
core.info(`PR labels: ${prLabels.join(" | ")}`);
core.info(`Semver Labels: ${semverLabels.join(" | ")}`);
if (semverLabels.length == 0) {
core.setFailed("You must add a SemVer label of one of ${validLabels.join(" | ")} to this PR");
}
if (semverLabels.length > 1) {
core.setFailed("You must only add one SemVer label to this PR");
}