Skip to content

Improve workflowRun Slack notification title for clarity #374

Improve workflowRun Slack notification title for clarity

Improve workflowRun Slack notification title for clarity #374

Workflow file for this run

name: test-build
on: [pull_request, push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20.11.0
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run all
env:
GITHUB_TOKEN: ${{ github.token }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: ${{ github.event_name != 'pull_request' }}
prepare-release:
if: contains(github.ref, 'master')
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: 20.11.0
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm run prepare-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # Use personal access token to trigger another workflow.