Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional test_artifacts_suffix for notify-ci-result. #308

Merged
merged 1 commit into from
Jul 30, 2024
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
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 for 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