-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
docsImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested
Milestone
Description
Hey folks, I had the v1 setup for the slack action working beautifully with your block kit output:
- name: Post to Slack Channel
id: slack2
uses: slackapi/slack-github-action@v1.23.0
with:
# https://app.slack.com/block-kit-builder
channel-id: "some-amazing-channel"
payload: |
{
"attachments": [
{
"color": "#0080FF",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*_${{ steps.get-service-name.outputs.SERVICE_NAME }}_ :factory: is doing a super special thing, checkout the url: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|build link>?"
}
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
continue-on-error: false
I don't see any examples similar to this. The channel was moved to the payload.. weird choice, but ok. Everything for block kit seems to be in yaml syntax? There's no way to use json I created previously? How would I migrate this?
This seems to mostly be in line but it dies fantastically without much of a helpful error: "A method must be decided"
- name: Post to Slack Channel
id: slack3
uses: slackapi/slack-github-action@v2.0.0
with:
# https://app.slack.com/block-kit-builder
payload: |
channel: "some-amazing-channel"
text: {
"attachments": [
{
"color": "#0080FF",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*_${{ steps.get-service-name.outputs.SERVICE_NAME }}_ :factory: is doing a super special thing, checkout the url: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|build link>?"
}
}
]
}
]
}
token: ${{ secrets.SLACK_BOT_TOKEN }}
continue-on-error: false
Thanks for any help you can provide on how to migrate these.
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested