chore: modify test action

[skip ci]
This commit is contained in:
Marcel S. Henselin 2026-03-27 11:31:56 +01:00
parent 92eaf87582
commit 2d4e9c723f
3 changed files with 11 additions and 5 deletions

View file

@ -71,7 +71,7 @@ outputs:
description: "the output of the tests"
status:
value: ${{ steps.testrun.status }}
value: ${{ steps.status.status }}
description: "the status of the tests"
runs:
@ -239,10 +239,9 @@ runs:
echo "Test failed, see acc_test_run.log for details"
res=$(cat acc_test_run.log | grep -v "=== RUN" | grep -v "\-\-\- PASS" | grep -v "=== CONT" | grep -v "=== PAUSE")
echo "result=FAIL: ${res}" >> "$GITHUB_OUTPUT"
echo "status=FAILED" >> "$GITHUB_OUTPUT"
exit 1
else
echo "status=SUCCESS" >> "$GITHUB_OUTPUT"
echo "result=no FAIL detected" >> "$GITHUB_OUTPUT"
fi
echo "::endgroup::"
env:
@ -254,6 +253,13 @@ runs:
TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }}
TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }}
- name: Set status output variable
if: always()
id: status
shell: bash
run: |
echo "status=${{ steps.testrun.outcome == 'success' && 'SUCCESS' || 'FAILURE' }}" >> "$GITHUB_OUTPUT"
- name: Upload test log artifact
if: always()
uses: actions/upload-artifact@v3

View file

@ -84,7 +84,7 @@ runs:
PAYLOAD=$(jq -n -r \
--arg header "${{ inputs.title }}" \
--arg subtitle "${{ inputs.subtitle || '' }}" \
--arg subtitle "${{ inputs.subtitle }}" \
--arg imgurl "https://cdn.simpleicons.org/${{ inputs.image_slug }}/${{ steps.status.outputs.color }}" \
--arg title "${{ inputs.event_title || 'no event title given' }}" \
--arg body "${{ inputs.event_body || 'no event body given' }}" \

View file

@ -93,7 +93,7 @@ jobs:
subtitle: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}"
event_title: ${{ forgejo.event_name }}
event_author: ${{ forgejo.actor }}
event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}"
event_body: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.result || steps.automatic_run.outputs.result }}"
event_number: ${{ forgejo.event.id }}
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}"
status: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}"