rtCamp/action-slack-notify

invalid control character in URL Error on versions >= 2.1.x

Closed this issue · 1 comments

On any version after 2.1.0 I get the following error:

Run rtCamp/action-slack-notify@v2.1.0
/usr/bin/docker run --name rtcampactionslacknotifyv210_736662 --label 3bec5f --workdir /github/workspace --rm -e PROJECT_ID -e GKE_CLUSTER -e GKE_ZONE -e IMAGE -e DEPLOYMENT_NAME -e TRANSIENT_TAG -e SLACK_TITLE -e SLACK_ICON_EMOJI -e SLACK_WEBHOOK -e SLACK_COLOR -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/elixir-backend/elixir-backend":"/github/workspace" rtcamp/action-slack-notify:v2.1.0
Error sending message: parse "***\n": net/url: invalid control character in URL

with the following configuration:

    - name: Success Slack Notification
      uses: rtCamp/action-slack-notify@v2.0.2
      if: ${{ success() }}
      env:
        SLACK_TITLE: Successful Github Actions Deployment
        SLACK_ICON_EMOJI: ':white_check_mark:'
        SLACK_WEBHOOK: ${{ secrets.DEPLOYMENT_SLACK_WEBHOOK }}
        SLACK_COLOR: good

The action works under v2.0.2

I had the same problem, but I was able to resolve it by removing the extra line in the github secrets.

This can be a low priority bug, but it would be good to allow \n in the webhook parsing