Skip to content

Commit 51fbf45

Browse files
committed
replace action
1 parent eb64704 commit 51fbf45

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.github/actions/podman-robot/action.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,17 @@ runs:
6565
MESSAGE="Failures were detected in the test results in ${{ inputs.bitbake_buildname }} for ${{ inputs.bitbake_target }} with ${{ inputs.bitbake_machine }}"
6666
echo "::warning file=.ci/run-tests.sh,title=Robot Framework tests::${MESSAGE}"
6767
echo "test_warning_detected=true" >> $GITHUB_ENV
68-
echo "test_warning_message=${MESSAGE}" >> $GITHUB_ENV
68+
echo "${MESSAGE}" > warning.txt
6969
}
7070
TIMESTAMP=${{ steps.timestamp.outputs.timestamp }}
7171
s3cmd put -r -F tests_results/robot s3://yocto/${TIMESTAMP}-${{ inputs.bitbake_buildname }}/
7272
- name: Comment on the pull request if there is a warning
7373
if: env.test_warning_detected == 'true'
74-
uses: actions/github-script@v7
74+
uses: mshick/add-pr-comment@v2
7575
with:
76-
github-token: ${{ inputs.github_token }}
77-
script: |
78-
const issueNumber = context.payload.pull_request ? context.payload.pull_request.number : null;
79-
if (issueNumber) {
80-
await github.rest.issues.createComment({
81-
owner: context.repo.owner,
82-
repo: context.repo.repo,
83-
issue_number: issueNumber,
84-
body: process.env.test_warning_message
85-
});
86-
}
87-
- name: Clean the tests directory
76+
message-path: |
77+
warning.txt
8878
if: always()
8979
shell: bash
9080
run: |
91-
rm -rf setup-env-local.sh tests_results
81+
rm -rf setup-env-local.sh tests_results warning.txt

0 commit comments

Comments
 (0)