@@ -38,56 +38,66 @@ jobs:
3838 check_breaking_changes :
3939 needs : get_matrix
4040 name : Check Breaking Changes
41- if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
4241 runs-on : ubuntu-latest
4342 strategy :
4443 matrix : ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
4544 steps :
4645 # Checks-out your repository under $GITHUB_WORKSPACE so job can access it
4746 - uses : actions/checkout@v3
47+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
4848 with :
4949 fetch-depth : 0
5050 # Ensure node version is great enough
5151 - name : Use Node.js v14.x
52+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
5253 uses : actions/setup-node@v3
5354 with :
5455 node-version : ' 14.x'
5556 # Try get node_modules from cache
5657 - name : Restore node_modules from cache
58+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
5759 uses : actions/cache@v3
5860 with :
5961 path : common/temp/pnpm-store
6062 key : ${{ runner.os }}-${{ hashFiles('common/config/rush/pnpm-lock.yaml') }}
6163 # Install dependencies
6264 - name : Install rush
65+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
6366 run : npm install -g @microsoft/rush@5.47.0
6467 - name : Install dependencies
68+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
6569 run : rush install --max-install-attempts 3
6670 # Switch flavor if necessary
6771 - name : Switch flavor for stable build
6872 id : switch-flavor
69- if : ${{ matrix.flavor == 'stable' }}
73+ if : ${{ matrix.flavor == 'stable' && github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
7074 run : |
7175 rush switch-flavor:stable
7276 - name : Check result of flavor switch
7377 if : ${{ always() && steps.switch-flavor.outcome == 'failure' }}
7478 run : echo "Failed to switch to stable flavor, please make sure you run 'rush update:stable' if dependencies were updated." && exit 1
7579 # Checkout the branch to be merged into in PR
7680 - name : Checkout base branch
81+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
7782 run : git checkout ${{ github.event.pull_request.base.ref }}
7883 - name : Build base api file
84+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
7985 run : rush build -t @azure/communication-react
8086 - name : Copy api file
87+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
8188 working-directory : packages/communication-react/
8289 run : |
8390 mkdir -p breaking-change-check/snapshots/
8491 cp dist/communication-react.d.ts breaking-change-check/snapshots/
8592 - name : Checkout current branch
93+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
8694 run : git checkout ${{ github.event.pull_request.head.ref }}
8795 # Builds
8896 - name : Build current api file
97+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
8998 run : rush build -t @azure/communication-react
9099 - name : Check breaking changes
100+ if : ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking-change') }}
91101 working-directory : packages/communication-react/
92102 id : breaking-changes
93103 run : rushx check-breaking-change
0 commit comments