[OneExplorer] Targeted refresh on Change/Delete #3162
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Commit | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
check-signed-off-by: | |
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'PR/NO TEST') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: refs/pull/${{ github.event.number }}/merge | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- run: npm install | |
- run: | | |
ROLL_BACK_COUNT=$(( ${{ github.event.pull_request.commits }} - 1 )) | |
git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }}~${ROLL_BACK_COUNT} > main_commit_msg | |
- run: npx ts-node infra/commit/signed-off-by-checker.ts main_commit_msg | |
- if: ${{ hashFiles('signed_off_by_checker.fail') }} | |
run: | | |
cat signed_off_by_checker.fail | |
exit 1 | |
check-no-body: | |
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'PR/NO TEST') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: refs/pull/${{ github.event.number }}/merge | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- run: npm install | |
- run: | | |
ROLL_BACK_COUNT=$(( ${{ github.event.pull_request.commits }} - 1 )) | |
git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }}~${ROLL_BACK_COUNT} > main_commit_msg | |
- run: npx ts-node infra/commit/no-body-checker.ts main_commit_msg | |
- if: ${{ hashFiles('no_body_checker.fail') }} | |
run: | | |
cat no_body_checker.fail | |
exit 1 |