Skip to content

Add Expert Review Instructions #302

Add Expert Review Instructions

Add Expert Review Instructions #302

Workflow file for this run

# This action will generate documentation artifacts from the latest doc sources.
#
name: build
on:
push:
branches: [ main ]
paths-ignore:
- 'generated/**'
- 'rfcxml/**'
pull_request:
branches: [ main ]
paths-ignore:
- 'generated/**'
- 'rfcxml/**'
permissions:
contents: write # for Git to git push
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Install rst2pdf
run: |
pip install --user rst2pdf
- name: Install xml2rfc
run: |
pip install --user xml2rfc
- uses: actions/checkout@v4
- name: Clone docs
run: |
git config --global user.email '[email protected]'
git config --global user.name 'Github Action'
git clone --branch generated https://github.com/ebpffoundation/ebpf-docs.git generated
- name: Build PDF
run: |
rst2pdf rst/instruction-set.rst generated/instruction-set.pdf
rst2pdf rst/abi.rst generated/abi.pdf
- name: Build xml files
run: |
wget https://github.com/dthaler/rst2rfcxml/releases/download/v1.5.0/Ubuntu.Release.rst2rfcxml.zip
unzip Ubuntu.Release.rst2rfcxml.zip
chmod 755 rst2rfcxml
./rst2rfcxml rst/instruction-set-skeleton.rst -o generated/draft-ietf-bpf-isa.xml
./rst2rfcxml rst/abi-skeleton.rst -o generated/draft-thaler-bpf-abi.xml
cd generated
xml2rfc draft-ietf-bpf-isa.xml
xml2rfc --html draft-ietf-bpf-isa.xml
xml2rfc draft-thaler-bpf-abi.xml
xml2rfc --html draft-thaler-bpf-abi.xml
- name: Check in generated files
if: github.event_name == 'push'
run: |
cd generated
git add .
if [ -n "$(git status --porcelain)" ]; then
git commit -s -m "Updated PDF"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/ebpffoundation/ebpf-docs.git
git push
fi
- name: Upload artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: Generated files
path: ${{github.workspace}}/generated
retention-days: 5