diff options
| -rw-r--r-- | .github/actions/slack/action.yml | 8 | ||||
| -rw-r--r-- | .github/workflows/sync_default_gems.yml | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/.github/actions/slack/action.yml b/.github/actions/slack/action.yml index 98171efc5e..c785b35aa4 100644 --- a/.github/actions/slack/action.yml +++ b/.github/actions/slack/action.yml @@ -18,6 +18,12 @@ inputs: Human-readable description of the run, something like "DEBUG=1". This need not be unique among runs. + event_name: + required: false + default: 'push' + description: >- + Target event to trigger notification. Notify only push by default. + outputs: {} # Nothing? runs: @@ -36,4 +42,4 @@ runs: } env: SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }} - if: ${{github.event_name == 'push' && startsWith(github.repository, 'ruby/')}} + if: ${{ github.event_name == inputs.event_name && startsWith(github.repository, 'ruby/') }} diff --git a/.github/workflows/sync_default_gems.yml b/.github/workflows/sync_default_gems.yml index bd5b30b861..c652325393 100644 --- a/.github/workflows/sync_default_gems.yml +++ b/.github/workflows/sync_default_gems.yml @@ -62,4 +62,5 @@ jobs: - uses: ./.github/actions/slack with: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot + event_name: workflow_dispatch if: ${{ failure() }} |
