File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373
7474 - name : Run latexmk
7575 run : |
76- ./build.sh "$GITHUB_WORKSPACE"
76+ ./build.sh -w ${{ github.workspace }}
7777
7878 - name : Create Release
7979 uses : softprops/action-gh-release@v2
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/sh -l
22
3- readonly WORK_DIR= " ${1 :- $(pwd)} "
3+ # Constants
44readonly MOUNT_POINT=' /workspace'
5- readonly USER=' ubuntu'
65
7- docker run --rm --entrypoint=" " -v " $WORK_DIR :$MOUNT_POINT " -w $MOUNT_POINT -u $USER ghcr.io/quasar6x/thesis-builder:latest latexmk
6+ usage () { echo " Usage: $0 -u <DOCKER_USERNAME> -w <WORK_DIR> [-h]" 1>&2 ; exit 1; }
7+
8+ unset -v DOCKER_USERNAME WORK_DIR
9+ while getopts " :u:w:h" opt; do
10+ case $opt in
11+ u)
12+ DOCKER_USERNAME=" $OPTARG "
13+ ;;
14+ w)
15+ WORK_DIR=" ${OPTARG:- $(pwd)} "
16+ ;;
17+ h|* )
18+ usage
19+ ;;
20+ esac
21+ done
22+
23+ # Set WORK_DIR if it was not sent on the CLI
24+ WORK_DIR=" ${WORK_DIR:- $(pwd)} "
25+
26+ docker run --rm \
27+ -v " $WORK_DIR :$MOUNT_POINT " \
28+ -w " $MOUNT_POINT " \
29+ -u " $DOCKER_USERNAME " \
30+ ghcr.io/quasar6x/thesis-builder:latest latexmk
You can’t perform that action at this time.
0 commit comments