add more references to the Security Culture project #193
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull request pipeline | |
# checks are only on the draft and root directories because that is where the changes should be | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
RESOURCE_PATH: release/assets/images:release/assets:release:assets/images:assets/images/logos:assets/images/logos/publish | |
# for security reasons the github actions are pinned to specific release versions | |
jobs: | |
link_checker: | |
name: Link checker | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout markdown | |
uses: actions/[email protected] | |
- name: Link Checker | |
uses: lycheeverse/[email protected] | |
with: | |
# skip the jekyll files under '_includes' directory, only check the draft and root directories | |
args: >- | |
--no-progress | |
--max-retries 5 | |
--exclude-path './_includes/*.html' | |
'./draft/**/*.md' | |
'*.md' | |
fail: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
md_linter: | |
name: Lint markdown | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout markdown | |
uses: actions/[email protected] | |
- name: Lint markdown | |
uses: DavidAnson/[email protected] | |
with: | |
config: '.markdownlint.yaml' | |
globs: 'draft/**/*.md' | |
# only check the draft directory, that is where the changes should be | |
spell_checker: | |
name: Check spelling | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout markdown | |
uses: actions/[email protected] | |
- name: spell_checker | |
uses: rojopolis/[email protected] | |
export_draft: | |
name: Export epub and pdf (Draft) | |
runs-on: ubuntu-24.04 | |
needs: [link_checker, md_linter, spell_checker] | |
steps: | |
- name: Checkout markdown | |
uses: actions/[email protected] | |
- name: Combine markdown | |
run: | | |
mkdir publish | |
mkdir assets/images/logos/publish | |
mkdir draft/temp | |
tail --lines=+14 -q $(find draft -name "*[0-9]*.md" | sort) > draft/temp/draft.markdown | |
sed -i "s/{: .image-right }/{height=180px}/g" draft/temp/draft.markdown | |
sed -i "s/{: .image-right-small }/{height=26px}/g" draft/temp/draft.markdown | |
- name: Export to pdf | |
uses: docker://pandoc/latex:3.1 | |
with: | |
args: >- | |
--from=markdown | |
--output=publish/OWASP_Developer_Guide.draft.pdf | |
--resource-path=${{ env.RESOURCE_PATH }} | |
-fmarkdown-implicit_figures | |
draft/title.pdf.yaml | |
draft/temp/draft.markdown | |
- name: Export to epub | |
uses: docker://pandoc/latex:3.1 | |
with: | |
args: >- | |
--from=markdown | |
--output=publish/OWASP_Developer_Guide.draft.epub | |
--resource-path=${{ env.RESOURCE_PATH }} | |
-fmarkdown-implicit_figures | |
draft/title.yaml | |
draft/temp/draft.markdown | |
- name: Save pdfs and epubs | |
uses: actions/[email protected] | |
with: | |
name: export-draft | |
path: publish |