Files
threshold/.github/workflows/milestone-checker.yml
T
cc94accc4f SEC-090: Automated trusted workflow pinning (2023-04-27) (#3187)
* Result of tsccr-helper -pin-all-workflows .

* chore: Disable cache from setup-go

---------

Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
Co-authored-by: Michael Li <michael.li@hashicorp.com>
2023-05-02 16:37:11 -04:00

42 lines
1.3 KiB
YAML

# This workflow checks that there is either a 'pr/no-milestone' label applied
# to a PR or there is a milestone associated with a PR
name: Check Milestone
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
# Runs on PRs to main and release branches
branches:
- main
- release/**
permissions:
contents: read
statuses: write
jobs:
# checks that a milestone entry is present for a PR
milestone-check:
# If there is a `pr/no-milestone` label we ignore this check
if: contains(github.event.pull_request.labels.*.name, 'pr/no-milestone') != true
runs-on: ${{ fromJSON(vars.RUNNER) }}
steps:
- name: Checkout Actions
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: be89ad434792280ebaa4d982ac72ba548b6f7095
- name: Set up Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '16.x'
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run PR Checks
uses: ./actions/pr-checks
with:
token: ${{ secrets.GITHUB_TOKEN }}
configPath: configs/milestone-check