diff options
author | Jeff Scheel <jeff@riscv.org> | 2022-11-16 14:17:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 14:17:20 -0500 |
commit | 644fe61b6e705acf3106b10b206357bfb7c6d2cb (patch) | |
tree | 579fa632f842e61756a31376b41d74076ad88be8 /.github/workflows | |
parent | db7f0f7fdba967f482267ee1befce6b436e7fbd5 (diff) | |
download | riscv-isa-manual-644fe61b6e705acf3106b10b206357bfb7c6d2cb.zip riscv-isa-manual-644fe61b6e705acf3106b10b206357bfb7c6d2cb.tar.gz riscv-isa-manual-644fe61b6e705acf3106b10b206357bfb7c6d2cb.tar.bz2 |
Sync with docs-template-master
1. Upgrade to Node 16
2. Handle Node 12 deprecations
3. Make workflow callable
Signed-off-by: Jeff Scheel <jeff@riscv.org>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build-pdf.yml | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/.github/workflows/build-pdf.yml b/.github/workflows/build-pdf.yml index 64d395d..09ca3d0 100644 --- a/.github/workflows/build-pdf.yml +++ b/.github/workflows/build-pdf.yml @@ -9,20 +9,40 @@ on: pull_request: branches: [ riscv-isa-asciidoc ] workflow_dispatch: + workflow_call: + outputs: + name: + description: "The base name of the pdf file (without .pdf extensions)" + value: ${{ jobs.build.outputs.name }} + pdf-name: + description: "The name of the pdf file (with .pdf extensions)" + value: ${{ jobs.build.outputs.pdf-name }} jobs: build: runs-on: ubuntu-latest env: + NAME: unpriv-isa-asciidoc APT_PACKAGES_FILE: ${{ github.workspace }}/dependencies/apt_packages.txt BUNDLE_GEMFILE: ${{ github.workspace }}/dependencies/Gemfile BUNDLE_BIN: ${{ github.workspace }}/bin NPM_PACKAGE_FOLDER: ${{ github.workspace }}/dependencies - PDF_RESULT: unpriv-isa-asciidoc.pdf + outputs: + name: ${{ steps.step1.outputs.name }} + pdf-name: ${{ steps.step2.outputs.pdf-name }} if: contains(github.ref, 'riscv-isa-asciidoc') steps: - - uses: actions/checkout@v2 + - name: Set outputs.name + id: step1 + run: echo "name=$NAME" >> $GITHUB_OUTPUT + - name: Set outputs.pdf-name + id: step2 + run: echo "pdf-name=$NAME.pdf" >> $GITHUB_OUTPUT + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: 'true' - name: Install Ubuntu packages run: | sudo apt-get update @@ -34,16 +54,16 @@ jobs: ruby-version: "2.6" bundler-cache: true # Node.js for wavedrom - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '16' - name: Install Node.js dependencies run: npm install ${NPM_PACKAGE_FOLDER} - name: Generate PDF @@ -52,8 +72,8 @@ jobs: PATH=${PATH}:${BUNDLE_BIN}:$(npm bin) \ make - name: Archive PDF result - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: ${{ env.PDF_RESULT }} - path: ./build/${{ env.PDF_RESULT }} + name: ${{ env.NAME }}.pdf + path: ${{ env.NAME }}.pdf retention-days: 7 |