diff --git a/Dockerfile b/.github/actions/Dockerfile similarity index 95% rename from Dockerfile rename to .github/actions/Dockerfile index 27209ff..a287248 100644 --- a/Dockerfile +++ b/.github/actions/Dockerfile @@ -70,5 +70,5 @@ RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc && \ RUN pnpm install RUN pnpm run style -RUN REVIEW_CONFIG_FILE=config-vivliostyle.yml REVIEW_VSCLI_USESANDBOX=true bundle exec rake vivliostyle +ENTRYPOINT ["./entrypoint.sh"] diff --git a/.github/actions/action.yml b/.github/actions/action.yml new file mode 100644 index 0000000..feb61b5 --- /dev/null +++ b/.github/actions/action.yml @@ -0,0 +1,5 @@ +name: 'build-book' +description: 'Build Book by Vivliostyle' +runs: + using: 'docker' + image: 'Dockerfile' \ No newline at end of file diff --git a/entrypoint.sh b/.github/actions/entrypoint.sh similarity index 100% rename from entrypoint.sh rename to .github/actions/entrypoint.sh diff --git a/.github/workflows/jobs.yml b/.github/workflows/jobs.yml index fcf27bf..1a332f4 100644 --- a/.github/workflows/jobs.yml +++ b/.github/workflows/jobs.yml @@ -232,4 +232,29 @@ jobs: with: name: ${{ format('るいざ第3集_{0}_{1}', 'vivliostyle', steps.date.outputs.date) }} path: book.pdf - + + vivliostyle-dockerfile: + # needs: reviewdog-github-check + name: Make PDF at Vivliostyle + runs-on: ubuntu-latest + container: + image: ghcr.io/huideyeren/review-docker:main + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - name: Get current date and time + env: + TZ: "Asia/Tokyo" # タイムゾーンを指定 + id: date + run: echo "::set-output name=date::$(date +'%Y年%m月%d日_%H時%M分')" + # '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。 + - name: Show date and time + run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42 + - name: Build Book + uses: ./ + id: build-book + - name: Upload artifact. + uses: actions/upload-artifact@v3 + with: + name: ${{ format('るいざ第3集_{0}_{1}', 'vivliostyle-docker', steps.date.outputs.date) }} + path: book.pdf