From df77e56dfbef8b6842ccfa1ddbd8436fff3758e3 Mon Sep 17 00:00:00 2001 From: satackey <21271711+satackey@users.noreply.github.com> Date: Mon, 30 Dec 2019 22:34:17 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Docker=20image=20=E3=81=AE=E8=BB=BD?= =?UTF-8?q?=E9=87=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62bfa61..a414319 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ -FROM docker:stable +FROM docker:stable AS docker-cli -WORKDIR /src -COPY entrypoint.sh ./ +FROM alpine + +COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker + +COPY entrypoint.sh /src/ ENTRYPOINT /src/entrypoint.sh From 75b0e97056aac878a67a3e1dbaa79058b1167462 Mon Sep 17 00:00:00 2001 From: satackey <21271711+satackey@users.noreply.github.com> Date: Mon, 30 Dec 2019 22:57:03 +0900 Subject: [PATCH 2/3] =?UTF-8?q?README=E6=9B=B8=E3=81=84=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e2504aa..bc7a9c7 100644 --- a/README.md +++ b/README.md @@ -1 +1,43 @@ -# action-latexmk \ No newline at end of file +# action-latexmk + +このアクションは指定されたファイルを`latexmk`コマンドでコンパイルします。 +DooD(Docker outside of Docker)を使っているため、任意Dockerイメージが利用可能です。 + +## Inputs + +### `docker-image` + +**必須** `latexmk`コマンドを実行するためのレジストリで公開されている Docker イメージ + +### `build-files` + +**必須** 1行ごとに区切られたビルドするファイルリスト +(`host-workspace`からの相対パス) +デフォルトは`actions/checkout`でチェックアウトされるパスです。 + +### `host-workspace` + +**任意** ビルドするファイルのディレクトリ +(ホストVMの絶対パス) +このパスがDockerコンテナにマウントされます。 + +### `container-workdir` + +**任意** コンテナ内のワークディレクトリ +このパスへDockerコンテナにマウントされます。 + +### `latexmk-options` +**任意** `latexmk`コマンド実行時のオプション + +## 使用例 + +```yaml +- name: Build LaTeX files + uses: satackey/action-latexmk@v1 + with: + docker-image: paperist/alpine-texlive-ja + build-files: | + hoge/main.tex + fuga/main.tex + piyo/main.tex +``` From c9e883560a3947f3053872b9e08e30f27340cfe9 Mon Sep 17 00:00:00 2001 From: satackey <21271711+satackey@users.noreply.github.com> Date: Mon, 30 Dec 2019 23:04:16 +0900 Subject: [PATCH 3/3] Dockerhub --- action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index d295377..b5f50ce 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,10 @@ inputs: description: 'Docker image to execute latexmk command' required: true + build-files: + description: 'List of TeX files separated by lines to build' + required: true + host-workspace: description: 'Location of directory to build' required: false @@ -15,10 +19,6 @@ inputs: required: false default: /work - build-files: - description: 'List of TeX files separated by lines to build' - required: true - latexmk-options: required: false @@ -27,8 +27,8 @@ branding: color: green runs: - using: 'docker' - image: 'Dockerfile' + using: docker + image: docker://satackey/action-latexmk:v1.0.0 env: BUILD_IMAGE: ${{ inputs.docker-image }} HOST_WORKSPACE: ${{ inputs.host-workspace }}