Fields

caution: Additional configuration is required to work with matrix.

Don't forget to add MATRIX_CONTEXT.
Not required if the fields do not contain jobs or tooks.

steps:
- uses: 8398a7/action-slack@v3
with:
fields: job,took
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required

If you have more than one, please enter it in csv format.
Corresponding types are as follows.

success
FieldRequired GITHUB_TOKENEnvironment VariableDescription
reponoAS_REPOA working repository name
commitnoAS_COMMITcommit hash
eventNamenoAS_EVENT_NAMEtrigger event name
refnoAS_REFgit refrence
workflownoAS_WORKFLOWGitHub Actions workflow name
actionnoAS_ACTIONGenerate a workflow link from git sha
messageyesAS_MESSAGEcommit message
authoryesAS_AUTHORThe author who pushed
jobyesAS_JOBThe name of the job that was executed
tookyesAS_TOOKExecution time for the job

caution: The Field in action is similar to what you get in workflow. It will be removed in the next major release version.

steps:
- uses: 8398a7/action-slack@v3
with:
fields: repo,commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required

If you want all items, specify all.

steps:
- uses: 8398a7/action-slack@v3
with:
fields: all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required