Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions notify-slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ runs:
with:
secrets: |
development/kv/data/slack token | SLACK_TOKEN;
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.10'
- name: Install dependencies
shell: bash
run: pip install -r "$GITHUB_ACTION_PATH/requirements.txt" --quiet
run: |
python3 -m venv "$GITHUB_ACTION_PATH/.venv"
"$GITHUB_ACTION_PATH/.venv/bin/pip" install -r "$GITHUB_ACTION_PATH/requirements.txt" --quiet
- name: Send Slack Notification
shell: bash
env:
Expand All @@ -57,7 +63,7 @@ runs:
INPUT_COLOR: ${{ inputs.color }}
INPUT_MESSAGE: ${{ inputs.message != '' && inputs.message || format('*Run:* {0}/{1}/actions/runs/{2}\n*Failed Jobs:* {3}', github.server_url, github.repository, github.run_id, steps.collect_failed_jobs.outputs.failed-jobs) }}
run: |
python "$GITHUB_ACTION_PATH/notify_slack.py" \
"$GITHUB_ACTION_PATH/.venv/bin/python" "$GITHUB_ACTION_PATH/notify_slack.py" \
--channel "$INPUT_CHANNEL" \
--project-name "$INPUT_PROJECT_NAME" \
--icon "$INPUT_ICON" \
Expand Down
Loading