diff --git a/.github/actions/notify-ci-result/action.yml b/.github/actions/notify-ci-result/action.yml index 02f903e9..92dd4b56 100644 --- a/.github/actions/notify-ci-result/action.yml +++ b/.github/actions/notify-ci-result/action.yml @@ -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" @@ -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 @@ -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' }} @@ -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