forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.64 KB
/
lint-bc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: BC Lint
on:
# Copied from check-labels.yml to get around needing approval for first time contributors
# See https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks
# Only allow pull_request_target when merging to main, not some historical branch.
#
# Make sure to don't introduce explicit checking out and installing/running
# untrusted user code into this workflow!
pull_request_target:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches: [main]
paths-ignore: [.github/workflows/lint-bc.yml]
# To allow testing PRs that change workflows.
# May be triggered together with pull_request_target, it's OK.
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
paths: [.github/workflows/lint-bc.yml]
branches-ignore: [nightly]
workflow_dispatch:
jobs:
bc_linter:
runs-on: ubuntu-latest
steps:
- name: Run BC Lint Action
uses: pytorch/test-infra/.github/actions/bc-lint@main
with:
repo: ${{ github.event.pull_request.head.repo.full_name }}
base_sha: ${{ github.event.pull_request.base.sha }}
head_sha: ${{ github.event.pull_request.head.sha }}
suppression: ${{ contains(github.event.pull_request.labels.*.name, 'suppress-api-compatibility-check') || contains(github.event.pull_request.labels.*.name, 'suppress-bc-linter') }}
docs_link: 'https://github.com/pytorch/test-infra/wiki/BC-Linter'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true