-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
94 lines (88 loc) · 3.29 KB
/
action.yaml
File metadata and controls
94 lines (88 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Compile with BookML
author: Vincenzo Mantova
description: Compile LaTeX files to HTML via BookML
branding:
icon: book
color: blue
inputs:
checkout:
description: Checkout the current repository
default: true
release:
description: Create a GitHub release with all the outputs
default: true
upload-aux-directory:
description: Upload the aux directory, including all outputs, longs, and other intermediate files into a GitHub artifact
default: true
scheme:
description: TeX Live scheme to use among 'basic', 'small', 'medium', 'full'
default: full
version:
description: BookML version (if the `bookml` folder is already present, this only affects which Docker image is used)
default: latest
replace-bookml:
description: Replace the `bookml` folder, if present, with the version included in the Docker image
default: false
timeout-minutes:
description: The maximum number of minutes to run BookML before cancelling the build
default: 6
outputs:
outputs:
description: File names of all outputs compiled by BookML
value: steps.bookml.outputs.outputs
targets:
description: File names of all targets that BookML tried to compile
value: steps.bookml.outputs.targets
outcome:
description: Compiling outcome (one of 'success', 'failure', 'timeout', 'invalid', 'cancelled')
value: steps.bookml.outputs.outcome
aux-directory-url:
description: URL of GitHub artifact containing the aux directory
value: steps.upload-aux-directory.outputs.artifact-url
release-url:
description: URL of GitHub release
value: steps.release.outputs.release-url
runs:
using: composite
steps:
- name: Checkout the current repository
if: ${{ inputs.checkout == 'true' }}
uses: actions/checkout@v4
# GitHub does not allow dynamic inputs in 'uses', so we need to pull the Docker image by hand
- name: Compile with BookML
id: bookml
shell: sh
env:
SCHEME: ${{ inputs.scheme }}
VERSION: ${{ inputs.version }}
REPLACE_BOOKML: ${{ inputs.replace-bookml }}
TIMEOUT_MINUTES: ${{ inputs.timeout-minutes }}
run: |
### Compile with BookML ###
"$GITHUB_ACTION_PATH"/compile.sh
- name: Upload aux directory (all products, including logs)
uses: actions/upload-artifact@v4
id: upload-aux-directory
if: ${{ always() && steps.bookml.outputs.outcome != 'invalid' && inputs.upload-aux-directory == 'true' }}
with:
name: aux-directory
path: ${{ runner.temp }}/auxdir/*
if-no-files-found: ignore
include-hidden-files: true
- name: Create summary and release
if: ${{ always() }}
id: release
shell: sh
env:
GH_TOKEN: ${{ github.token }}
JOB_CHECK_RUN_ID: ${{ job.check_run_id }}
RELEASE: ${{ inputs.release }}
AUX_URL: ${{ steps.upload-aux-directory.outputs.artifact-url }}
OUTCOME: ${{ steps.bookml.outcome == 'cancelled' && 'cancelled' || steps.bookml.outputs.outcome }}
TARGETS: ${{ steps.bookml.outputs.targets }}
OUTPUTS: ${{ steps.bookml.outputs.outputs }}
MESSAGE: ${{ github.event.head_commit.message }}
VERSION: ${{ inputs.version }}
run: |
### Create summary and release ###
"$GITHUB_ACTION_PATH"/release.sh