Skip to content

Commit

Permalink
Merge pull request #1 from satackey/weight-saving
Browse files Browse the repository at this point in the history
Weight saving
  • Loading branch information
satackey authored Dec 30, 2019
2 parents d45958e + c9e8835 commit 504c997
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 10 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# action-latexmk
# 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
```
12 changes: 6 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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 }}
Expand Down

0 comments on commit 504c997

Please sign in to comment.