github: add some basic GH Actions to build the notebook
Paul Moore
maintainerPATCH 1/1 github: add some basic GH Actions to build the notebook
This patch adds GH Actions to built the HTML, PDF, and EPUB variants of The SELinux Notebook when the GH repo is updated or a pull request is submitted. This should make it much easier for people to validate their changes as well as providing fully rendered copies for each revision moving forward.
Signed-off-by Paul Moore <[email protected]>
--- .github/actions/setup/action.yml | 16 ++++++++++++++++ .github/workflows/epub.yml | 26 ++++++++++++++++++++++++++ .github/workflows/html.yml | 26 ++++++++++++++++++++++++++ .github/workflows/pdf.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/epub.yml create mode 100644 .github/workflows/html.yml create mode 100644 .github/workflows/pdf.yml
.github/actions/setup/action.yml new file +16 -0
@@ -0,0 +1,16 @@ +# +# Github Action to setup The SELinux Notebook build +# +# Copyright (c) 2022 Microsoft Corporation <[email protected]> +# Author: Paul Moore <[email protected]> +# + +name: Setup the build for The SELinux Notebook +description: "Install dependencies for The SELinux Notebook build" +runs: + using: "composite" + steps: + - run: sudo apt-get update + shell: bash + - run: sudo apt-get install -y build-essential weasyprint pandoc calibre + shell: bash
.github/workflows/epub.yml new file +26 -0
@@ -0,0 +1,26 @@ +# +# Github Action to build The SELinux Notebook +# +# Copyright (c) 2022 Microsoft Corporation <[email protected]> +# Author: Paul Moore <[email protected]> +# + +name: EPUB build +on: ["push", "pull_request"] + +jobs: + epub: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout from GitHub + uses: actions/checkout@v2 + - name: Setup the build directory + uses: ./.github/actions/setup + - name: Run the build + run: make epub + - name: Archive the rendering + uses: actions/upload-artifact@v3 + with: + name: EPUB rendering + path: ./epub/SELinux_Notebook.azw3
.github/workflows/html.yml new file +26 -0
@@ -0,0 +1,26 @@ +# +# Github Action to build The SELinux Notebook +# +# Copyright (c) 2022 Microsoft Corporation <[email protected]> +# Author: Paul Moore <[email protected]> +# + +name: HTML build +on: ["push", "pull_request"] + +jobs: + html: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout from GitHub + uses: actions/checkout@v2 + - name: Setup the build directory + uses: ./.github/actions/setup + - name: Run the build + run: make html + - name: Archive the rendering + uses: actions/upload-artifact@v3 + with: + name: HTML rendering + path: ./html/SELinux_Notebook.html
.github/workflows/pdf.yml new file +26 -0
@@ -0,0 +1,26 @@ +# +# Github Action to build The SELinux Notebook +# +# Copyright (c) 2022 Microsoft Corporation <[email protected]> +# Author: Paul Moore <[email protected]> +# + +name: PDF build +on: ["push", "pull_request"] + +jobs: + pdf: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout from GitHub + uses: actions/checkout@v2 + - name: Setup the build directory + uses: ./.github/actions/setup + - name: Run the build + run: make pdf + - name: Archive the rendering + uses: actions/upload-artifact@v3 + with: + name: PDF rendering + path: ./pdf/SELinux_Notebook.pdf
Paul Moore
maintainerQuoted 8 lines · Paul Moore
This patch adds GH Actions to built the HTML, PDF, and EPUB variants of The SELinux Notebook when the GH repo is updated or a pull request is submitted. This should make it much easier for people to validate their changes as well as providing fully rendered copies for each revision moving forward.
Signed-off-by Paul Moore <[email protected]>
Quoted 10 lines
--- .github/actions/setup/action.yml | 16 ++++++++++++++++ .github/workflows/epub.yml | 26 ++++++++++++++++++++++++++ .github/workflows/html.yml | 26 ++++++++++++++++++++++++++ .github/workflows/pdf.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/epub.yml create mode 100644 .github/workflows/html.yml create mode 100644 .github/workflows/pdf.yml
Since this is more of a tooling patch and not a content patch I'm merging this now.
Signature · 1 line
paul-moore.com