Skip to content

Commit

Permalink
Add optional test_artifacts_suffix for notify-ci-result.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rj1k committed Jul 30, 2024
1 parent fcc79ad commit 18f2a3d
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/actions/notify-ci-result/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ inputs:
test_logs_path:
required: false
description: path where the test logs are located (required for run_tests)

test_artifacts_suffix:
required: false
description: artifacts name suffix the run_tests

runs:
using: "composite"
Expand Down Expand Up @@ -74,7 +76,11 @@ runs:
if: >
${{ inputs.for == 'scan_build' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
(
github.ref == 'refs/heads/master' ||
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/release'
) &&
inputs.channel != '' &&
inputs.slack_webhook_url != '' }}
uses: signalwire/actions-template/.github/actions/slack@main
Expand All @@ -88,7 +94,7 @@ runs:
if: ${{ inputs.for == 'run_tests' }}
uses: actions/upload-artifact@v4
with:
name: test-results-${{ github.sha }}-${{ github.run_number }}
name: test-results-${{ github.sha }}-${{ github.run_number }}${{ inputs.test_artifacts_suffix }}
path: ${{ inputs.test_logs_path }}/logs
- name: Comment run tests result on PR
if: ${{ inputs.for == 'run_tests' && github.event_name == 'pull_request' }}
Expand All @@ -98,9 +104,13 @@ runs:
Unit-Tests failed: [#${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
- name: Notify run tests result to slack
if: >
${{ inputs.for == 'run_tests' &&
${{ inputs.for == 'scan_build' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
(
github.ref == 'refs/heads/master' ||
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/release'
) &&
inputs.channel != '' &&
inputs.slack_webhook_url != '' }}
uses: signalwire/actions-template/.github/actions/slack@main
Expand Down

0 comments on commit 18f2a3d

Please sign in to comment.