mirror of
https://github.com/awesome-jellyfin/awesome-jellyfin.git
synced 2026-04-29 14:08:13 -05:00
ci: update diff for README.md sorting check
This commit is contained in:
25
.github/workflows/sorting-pull-check.yaml
vendored
25
.github/workflows/sorting-pull-check.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: 'README Sorting Check'
|
||||
name: 'README Update Pull Request'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -31,13 +31,9 @@ jobs:
|
||||
-fail
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate diff
|
||||
id: diff
|
||||
- name: Generate Comment Body on Failure
|
||||
if: steps.sorting.outcome == 'failure'
|
||||
run: |
|
||||
if [ ! -f README.md ]; then touch README.md; fi
|
||||
if [ ! -f README.sorted.md ]; then touch README.sorted.md; fi
|
||||
|
||||
cat <<EOF > comment_body.txt
|
||||
<!-- [sort-result] -->
|
||||
**Thank you for your contribution! ❤️**
|
||||
@@ -48,13 +44,23 @@ jobs:
|
||||
<details>
|
||||
<summary><code>README.md</code> diff</summary>
|
||||
|
||||
\`\`\`diff
|
||||
$(diff -u README.md README.sorted.md || true)
|
||||
\`\`\`
|
||||
\`\`\`diff
|
||||
$(diff -u README.md README.sorted.md || true)
|
||||
\`\`\`
|
||||
|
||||
</details>
|
||||
EOF
|
||||
|
||||
- name: Generate Comment Body on Success
|
||||
if: steps.sorting.outcome != 'failure'
|
||||
run: |
|
||||
cat <<EOF > comment_body.txt
|
||||
<!-- [sort-result] -->
|
||||
**Thank you for your contribution! ❤️**
|
||||
|
||||
No issues found with the ordering.
|
||||
EOF
|
||||
|
||||
- name: Find Comment from Linter
|
||||
uses: peter-evans/find-comment@v3
|
||||
id: fc
|
||||
@@ -64,7 +70,6 @@ jobs:
|
||||
body-includes: '<!-- [sort-result] -->'
|
||||
|
||||
- name: Create or Update Sorting Diff Comment
|
||||
if: steps.sorting.outcome == 'failure'
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
|
||||
Reference in New Issue
Block a user