-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set up Github Action (container action)
- Loading branch information
0 parents
commit 2c7edf1
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:12 | ||
|
||
# do not require puppeteer download of Chronium; | ||
# resume-cli uses puppeteer for PDF export, which we do not use. | ||
ENV PUPPETEER_SKIP_DOWNLOAD=1 | ||
|
||
LABEL repository="https://github.com/kelvintaywl/jsonresume-github-page" | ||
LABEL homepage="https://github.com/kelvintaywl/jsonresume-github-page" | ||
LABEL maintainer="Kelvin Tay <[email protected]>" | ||
|
||
RUN npm install -g [email protected] | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# action.yml | ||
name: 'JSONResume Export' | ||
description: 'Simple GitHub Action to export your JSONResume' | ||
branding: | ||
icon: 'printer' | ||
color: 'yellow' | ||
inputs: | ||
theme: | ||
description: | | ||
JSONResume theme name. | ||
Assumes the theme package would be found | ||
as `jsonresume-theme-{theme}` in NPM. | ||
You can search for themes at https://npmsearch.com/?q=jsonresume-theme | ||
required: true | ||
default: 'flat' | ||
resume_filepath: | ||
description: | | ||
File path of the resume in JSONResume format | ||
required: false | ||
default: 'resume.json' | ||
output_filepath: | ||
description: | | ||
Output file path for exported HTML file. | ||
required: false | ||
default: 'index.html' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.theme }} | ||
- ${{ inputs.resume_filepath }} | ||
- ${{ inputs.output_filepath }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -l | ||
|
||
THEME=${1} | ||
RESUME=${2} | ||
OUTPUT=${3} | ||
|
||
THEME_PACKAGE=jsonresume-theme-${THEME} | ||
echo "Installing theme: ${THEME}" | ||
|
||
# NOTE: this needs to be installed locally, not globally | ||
npm install ${THEME_PACKAGE} | ||
|
||
resume export --resume ${RESUME} --theme ${THEME} --format html ${OUTPUT} |