Skip to content

Update

Update #2

Workflow file for this run

name: Slack
on:
push:
branches:
- slack
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Get package information
id: package_info
run: |
CHANGES='[{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]'
echo "::set-output name=changes::$CHANGES"
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |

Check failure on line 30 in .github/workflows/slack.yml

View workflow run for this annotation

GitHub Actions / Slack

Invalid workflow file

The workflow is not valid. .github/workflows/slack.yml (Line: 30, Col: 20): Unrecognized named-value: 'package'. Located at position 1 within expression: package.name
{
"text": "🎉 New releases available:",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🎉 New releases available:"
}
},
{{#each (fromJSON(steps.package_info.outputs.changes)) as |package|}}
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Package Name:*\n${{ package.name }}"
},
{
"type": "mrkdwn",
"text": "*Version:*\n${{ package.version }}"
}
]
},
{{/each}}
]
}
env:
SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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"