-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.49 KB
/
upload_pdf_to_pr.yaml
File metadata and controls
49 lines (40 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Upload PDF to pull request
on:
pull_request:
branches: [main]
paths:
- 'specifications/**'
types: [opened, synchronize, reopened]
jobs:
upload-pdf-to-pr:
permissions:
# Required to upload/save artifact, otherwise you'll get
# "Error: Resource not accessible by integration"
contents: write
# Required to post comment, otherwise you'll get
# "Error: Resource not accessible by integration"
pull-requests: write
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Append open issues to AsciiDoc files
run: |
cd specifications
ls chapters/*.adoc | xargs -i .scripts/append_oppen_issues.py {} ${{ github.repository }}
- name: Generate PDF file
run: |
cd specifications
docker run --rm -v $(pwd):/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf \
-a scripts=cjk -a pdf-theme=default-with-fallback-font requirements_specifications.adoc
- name: Pull request artifacts
uses: gavv/pull-request-artifacts@v1.0.0
with:
# Commit hash that triggered PR
commit: ${{ github.event.pull_request.head.sha }}
# Token for current repo (used to post PR comment)
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifacts-branch: artifacts
# Whitespace-separated list of files to upload
artifacts: |
specifications/requirements_specifications.pdf