Proofreading fixes 0x05d part 1 (by @NowSecure) #1583
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: Documents Build | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'Document/**.md' | |
push: | |
branches: | |
- master | |
tags: | |
- v*.*.* | |
paths: | |
- 'Document/**.md' | |
jobs: | |
Generate-MASTG-Documents: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install -r tools/scripts/requirements.txt | |
- name: Set MASTG_VERSION to env | |
run: echo "MASTG_VERSION=$(curl "https://api.github.com/repos/OWASP/owasp-mastg/tags" | jq -r '.[0].name')" >> $GITHUB_ENV | |
- name: Set DEV MASTG_VERSION if it's not a tag | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: echo "MASTG_VERSION=${{env.MASTG_VERSION}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Get Latest MASVS Release Tag | |
run: echo "MASVS_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-masvs/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- name: Assemble Testing Chapters | |
run: python3 tools/scripts/assemble_test_chapters.py | |
- name: Process Files | |
run: python3 tools/scripts/transform_files.py | |
- name: Generate English PDF | |
run: ./tools/docker/pandoc_makedocs.sh Document ${{env.MASTG_VERSION}} ${{env.MASVS_VERSION}} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: OWASP_MASTG | |
path: OWASP_MASTG* | |
Generate-Checklists: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install -r tools/scripts/requirements.txt | |
- name: Set MASTG_VERSION to env | |
# run: echo "MASTG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV | |
run: echo "MASTG_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-mastg/tags | jq '.[0].name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- name: Set DEV VERSION if it's not a tag | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: echo "MASTG_VERSION=${{env.MASTG_VERSION}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Confirm MASTG Current Tag | |
run: echo ${{env.MASTG_VERSION}} | |
- name: Get MASTG Current Commit ID | |
run: echo "MASTG_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Confirm MASTG Current Commit ID | |
run: echo ${{env.MASTG_COMMIT}} | |
- name: Get Latest MASVS Release Tag | |
run: echo "MASVS_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-masvs/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- name: Confirm MASVS Release Tag | |
run: echo ${{env.MASVS_VERSION}} | |
- uses: actions/checkout@v3 | |
with: | |
repository: "OWASP/owasp-masvs.git" | |
ref: ${{env.MASVS_VERSION}} | |
fetch-depth: 1 | |
path: tools/scripts/owasp-masvs | |
- name: Get MASVS Current Commit ID | |
run: cd tools/scripts/owasp-masvs && echo "MASVS_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Confirm MASTG Current Commit ID | |
run: echo ${{env.MASVS_COMMIT}} | |
- name: Generate Excel | |
run: python3 tools/scripts/yaml_to_excel.py --mastgversion ${{env.MASTG_VERSION}} --mastgcommit ${{env.MASTG_COMMIT}} --masvsversion ${{env.MASVS_VERSION}} --masvscommit ${{env.MASVS_COMMIT}} | |
# - name: Upload Enhanced MASVS YAML | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: Enhanced-MASVS-YAML-Files | |
# path: tools/scripts/masvs_full_*.yaml | |
- name: Upload Checklists | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Checklists | |
path: OWASP_MAS_Checklist*.xlsx | |
release: | |
runs-on: ubuntu-latest | |
needs: [Generate-MASTG-Documents, Generate-Checklists] | |
if: startsWith(github.ref, 'refs/tags/') && (github.actor == 'cpholguera' || github.actor == 'sushi2k') | |
steps: | |
- uses: actions/download-artifact@v2 | |
- name: List Downloaded document (sampling of download-artifact) | |
run: ls -l OWASP_MASTG* | |
- name: print working directory | |
run: pwd | |
- name: Listing of root directory | |
run: ls -l | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: false | |
draft: true | |
generate_release_notes: true | |
discussion_category_name: Announcements | |
files: | | |
OWASP_MASTG/OWASP_MASTG.pdf | |
OWASP_MASTG/OWASP_MASTG.epub | |
Checklists/*.xlsx | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |