Skip to content

Commit 64d7edf

Browse files
committed
ci(draw-keymaps): print a summary
1 parent 2123c0f commit 64d7edf

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/draw-keymaps.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,25 @@ jobs:
3131
- name: Draw keymaps
3232
run: nix run .#draw
3333

34-
# TODO print to $GITHUB_STEP_SUMMARY
3534
- name: Commit changes
35+
id: commit
3636
uses: stefanzweifel/git-auto-commit-action@v4
3737
with:
3838
commit_message: "[Draw] ${{ github.event.head_commit.message || '(Manually triggered)' }}"
3939
file_pattern: img/**
4040

41+
- name: Summarize
42+
run: |
43+
sha="${{ steps.commit.outputs.commit_hash }}"
44+
url="${{ github.server_url }}/${{ github.repository }}/commit/$sha"
45+
46+
echo "## Summary" >> $GITHUB_STEP_SUMMARY
47+
48+
if [[ -z "$sha" ]]; then
49+
echo "Nothing to commit!" >> $GITHUB_STEP_SUMMARY
50+
else
51+
echo "[\`${sha:0:6}\`]($url) pushed to \`${{ github.ref_name }}\`." >> $GITHUB_STEP_SUMMARY
52+
fi
53+
54+
echo >> $GITHUB_STEP_SUMMARY
55+

0 commit comments

Comments
 (0)