Merge branch 'main' into renovate/technote-space-workflow-conclusion-… #134
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: Review | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '**' | |
jobs: | |
review: | |
name: Review | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
submodules: true | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Lint | |
run: | | |
npm install | |
git diff --name-only HEAD~ | xargs npm exec textlint | |
success_notification: | |
name: Success notification | |
needs: review | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v3 | |
- uses: rtCamp/action-slack-notify@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_51 }} | |
SLACK_TITLE: Review Success | |
if: env.WORKFLOW_CONCLUSION == 'success' | |
failure_notification: | |
name: Failure notification | |
needs: review | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v3 | |
- uses: rtCamp/action-slack-notify@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_51 }} | |
SLACK_TITLE: Review Failure | |
SLACK_COLOR: danger | |
if: env.WORKFLOW_CONCLUSION == 'failure' |