This repository was archived by the owner on Sep 13, 2025. It is now read-only.
[command] npm run release #119
This file contains hidden or 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: Slack Mainline | |
| on: | |
| push: | |
| branches: | |
| - v3 | |
| jobs: | |
| notification: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Succeeded Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: success | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Failed Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: failure | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Cancelled Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: cancelled | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: ${{ job.status }} | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Legacy Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: ${{ job.status }} | |
| username: legacy user | |
| icon_emoji: ":octocat:" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEGACY_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Custom Field Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: custom | |
| custom_payload: | | |
| { | |
| text: "Custom Field Check", | |
| attachments: [{ | |
| "author_name": "8398a7@action-slack", // json | |
| fallback: 'fallback', | |
| color: 'good', | |
| title: 'CI Result', | |
| text: 'Succeeded', | |
| fields: [{ | |
| title: 'lower case', | |
| value: 'LOWER CASE CHECK'.toLowerCase(), | |
| short: true | |
| }, | |
| { | |
| title: 'reverse', | |
| value: 'gnirts esrever'.split('').reverse().join(''), | |
| short: true | |
| }, | |
| { | |
| title: 'long title1', | |
| value: 'long value1', | |
| short: false | |
| }], | |
| actions: [{ | |
| }] | |
| }] | |
| } | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Custom Field2 | |
| 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}@${process.env.AS_REF} by ${process.env.AS_AUTHOR} ${{ job.status }} in ${process.env.AS_TOOK}`, | |
| }] | |
| } | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEGACY_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - name: Fields Check | |
| uses: 8398a7/action-slack@v3 | |
| with: | |
| status: ${{ job.status }} | |
| fields: repo,message,commit,author,job,eventName,ref,workflow,took | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| - uses: 8398a7/action-slack@v3 | |
| with: | |
| status: ${{ job.status }} | |
| fields: repo,message,job,took | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| matrix-notification: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-20.04, ubuntu-22.04] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: 8398a7/action-slack@v3 | |
| with: | |
| status: ${{ job.status }} | |
| fields: job,took | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_INTEGRATION_TEST }} | |
| MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
| if: always() |