Provides the function of slack notification to GitHub Actions.
Перейти к файлу
839 77ac519c61
[#84] Fixed the part that is in full render
2020-06-29 13:17:30 +09:00
.github/workflows Change to minimum information 2020-06-28 23:05:18 +09:00
__tests__ [#70] If a field contains all, it takes all values 2020-06-28 21:25:41 +09:00
docs [#84] Fixed the part that is in full render 2020-06-29 13:17:30 +09:00
src [#70] Fixed for eslint 2020-06-28 21:41:00 +09:00
.eslintignore update template 2019-12-27 16:35:42 +09:00
.eslintrc.json [#81] Update eslint config 2020-06-28 16:45:50 +09:00
.gitignore update template 2019-12-27 16:35:42 +09:00
.prettierignore update template 2019-12-27 16:35:42 +09:00
.prettierrc.json update template 2019-12-27 16:35:42 +09:00
LICENSE Prepare repository 2019-08-16 00:19:52 +09:00
README.md Update example image 2020-06-28 23:08:36 +09:00
action.yml [#31] Add required key 2020-04-05 17:36:09 +09:00
jest.config.js [#66] upgrade jest 2020-06-12 22:39:06 +09:00
package-lock.json bump 3.4.0 2020-06-28 22:30:12 +09:00
package.json bump 3.4.0 2020-06-28 22:30:12 +09:00
tsconfig.json update template 2019-12-27 16:35:42 +09:00

README.md

action-slack

codecov

Quick Start

You can learn more about it here.

steps:
  - uses: 8398a7/action-slack@v3
    with:
      status: ${{ job.status }}
      fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
    if: always() # Pick up events even if the job fails or is canceled.
success

Custom Formats of your choice

You can learn more about it here.

steps:
  - uses: 8398a7/action-slack@v3
  with:
    status: custom
    fields: workflow,job,commit,repo,ref,author,took
    custom_payload: |
      {
        username: 'action-slack',
        icon_emoji: ':octocat:',
        attachments: [{
          color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
          text: `${process.env.AS_WORKFLOW}\n${process.env.AS_JOB} (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@master by ${process.env.AS_AUTHOR} succeeded in ${process.env.AS_TOOK}`,
        }]
      }      
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
custom