-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use right image url fix: workdir for actions fix: image command/entrypoint fix: add necessary libraries for image generation fix: chrome installation in the image build: run only one build concurrently fix: let puppeteer download the chrome it prefers s
- Loading branch information
Showing
5 changed files
with
81 additions
and
6 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,39 @@ | ||
name: Create and publish a Docker image | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: ['main'] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,2 @@ | ||
.idea | ||
.vagrant |
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
FROM pandoc/latex:2.13 | ||
|
||
ENV CHROME_BIN="/usr/bin/chromium-browser" | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" | ||
WORKDIR /action/workspace | ||
|
||
RUN apk add --update chromium npm | ||
RUN npm install -g [email protected].5 --unsafe-perm=true | ||
RUN apk add --update npm bash gmp-dev librsvg-dev | ||
RUN npm install -g [email protected].6 --unsafe-perm=true | ||
|
||
ENTRYPOINT ["./run-pandoc.sh"] | ||
ENTRYPOINT ["pandoc", "-F", "mermaid-filter", "-o"] |
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,23 @@ | ||
Vagrant.require_version ">= 2.2.4" | ||
Vagrant.configure(2) do |config| | ||
# Base box | ||
config.vm.box = "ubuntu/lunar64" | ||
|
||
# Virtual machine details - VirtualBox | ||
config.vm.provider "virtualbox" do |v| | ||
v.gui = false | ||
v.cpus = 4 | ||
v.memory = 4096 | ||
v.name = "PandocMermaidAction" | ||
v.default_nic_type = "virtio" | ||
|
||
if Vagrant::Util::Platform.windows? then | ||
v.customize ["modifyvm", :id, "--uartmode1", "client", "NUL"] | ||
else | ||
v.customize ["modifyvm", :id, "--uartmode1", "file", "/dev/null"] | ||
end | ||
end | ||
|
||
# Shared folder owner to ubuntu instead of vagrant | ||
config.vm.synced_folder ".", "/vagrant", name: "vagrant", disabled: false | ||
end |
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 |
---|---|---|
@@ -1,6 +1,18 @@ | ||
--- | ||
name: 'Pandoc-Mermaid' | ||
description: 'Run pandoc with the mermaid-filter' | ||
inputs: | ||
input-file: | ||
description: 'The input file' | ||
required: false | ||
default: 'README.md' | ||
output-file: | ||
description: 'The output file' | ||
required: false | ||
default: 'README.pdf' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
image: 'docker://ghcr.io/net9-oy/pandoc-mermaid-action:main' | ||
args: | ||
- ${{ inputs.output-file }} | ||
- ${{ inputs.input-file }} |