ci: add link back to workflow summary in pr comment
This commit is contained in:
parent
1d6b79741e
commit
5aaea5b8ed
1 changed files with 16 additions and 2 deletions
18
.github/workflows/ci-comment.yml
vendored
18
.github/workflows/ci-comment.yml
vendored
|
|
@ -31,16 +31,30 @@ jobs:
|
||||||
path: summaries
|
path: summaries
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Debug
|
- name: Get workflow URL
|
||||||
run: ls -R
|
id: workflow-url
|
||||||
|
run: |
|
||||||
|
repo_url="${{ github.server_url }}/${{ github.repository }}"
|
||||||
|
echo "url=$repo_url/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Merge summaries
|
- name: Merge summaries
|
||||||
id: summary
|
id: summary
|
||||||
run: |
|
run: |
|
||||||
|
files=$(ls summaries)
|
||||||
|
if [ -z "$files" ]; then
|
||||||
|
echo "No summaries found"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "message<<EOF" >> $GITHUB_OUTPUT
|
echo "message<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
echo "## CI Summary" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
for file in summaries/*; do
|
for file in summaries/*; do
|
||||||
echo $(cat $file) >> $GITHUB_OUTPUT
|
echo $(cat $file) >> $GITHUB_OUTPUT
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "[Full summary](${{ steps.workflow-url.outputs.url }})" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set PR comment
|
- name: Set PR comment
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue