Skip to content

Commit d778f40

Browse files
committed
Add Breaking Changes Validator Action
1 parent 8243d55 commit d778f40

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Validate breaking depended libraries
2+
on:
3+
pull_request:
4+
types: [labeled, unlabeled, opened, edited] # Run when labels change or PR events occur
5+
workflow_dispatch:
6+
7+
# Ensures that only the latest commit is running for each PR at a time.
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
# required for the action to create comments on the PR
14+
pull-requests: write
15+
16+
jobs:
17+
validate-depended-libraries:
18+
name: "Validate if ${{ matrix.library.name }} is broken"
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
library:
24+
- name: 'JFrog CLI'
25+
branch: 'dev'
26+
url: 'https://github.com/jfrog/jfrog-cli.git'
27+
- name: 'Frogbot'
28+
url: 'https://github.com/jfrog/frogbot.git'
29+
branch: 'dev'
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ github.event.pull_request.head.sha }}
34+
35+
- uses: attiasas/breaking-change-validator@main
36+
env:
37+
# Optional, needed for some action operations (generating PR comments)
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
repository: ${{ matrix.library.url }}
41+
branch: ${{ matrix.library.branch }}
42+
output_strategy: 'terminal, summary, comment'
43+
test_command: ${{ github.event_name != 'pull_request' && matrix.library.test_command || (contains(github.event.pull_request.labels.*.name, 'test dependencies') && matrix.library.test_command) || '' }}
44+
remediation_label: ${{ github.event_name == 'pull_request' && 'breaking change' || '' }}

0 commit comments

Comments
 (0)