Skip to content

Commit ce93644

Browse files
evealitaylorkoppor
andauthored
#8 step summary (#10)
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
1 parent aaf38ec commit ce93644

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// Corresponding Dockerfile: https://github.com/JabRef/jabref/blob/main/Dockerfile.jabkit
1+
# Corresponding Dockerfile: https://github.com/JabRef/jabref/blob/main/Dockerfile.jabkit
22
FROM ghcr.io/jabref/jabkit:edge
33

4-
ENTRYPOINT ["/jabref/jabkit/bin/jabkit"]
4+
COPY entrypoint.sh /entrypoint.sh
5+
6+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
3030
### Output
3131
32+
The action generates a consistency check report as a Markdown table.
33+
This is automatically added to the [Job summary](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#example-of-adding-a-job-summary) of your workflow run.
34+
3235
| entry type | citation key | Eprint | File | Number | Pages | URL |
3336
| ---------- | -------------- | ------ | ---- | ------ | ----- | --- |
3437
| Article | Cooper_2007 | - | - | o | o | - |

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ runs:
99
using: 'docker'
1010
image: 'Dockerfile'
1111
args:
12+
- ${{ inputs.bibfile }}
1213
- check-consistency
1314
- --input=${{ inputs.bibfile }}
1415
- --porcelain

entrypoint.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -o pipefail
3+
4+
echo "## $1" >> $GITHUB_STEP_SUMMARY
5+
echo "" >> $GITHUB_STEP_SUMMARY
6+
7+
shift
8+
9+
/jabref/jabkit/bin/jabkit "$@" 2>&1 | tee -a "$GITHUB_STEP_SUMMARY"
10+
11+
exit_code=${PIPESTATUS[0]}
12+
13+
if [ "$exit_code" -eq 0 ]; then
14+
echo "✅ no inconsistencies" | tee -a "$GITHUB_STEP_SUMMARY"
15+
fi
16+
17+
exit "$exit_code"

0 commit comments

Comments
 (0)