forked from redhat-documentation/supplementary-style-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.06 KB
/
build-pdf-release.yml
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
name: Build and release PDF
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# copy /pdf-assets from the container before the build
- name: Extract assets
run: |
CONTAINER_ID=$(docker run --detach quay.io/redhat-docs/redhat-docs-pdf-template)
docker cp $CONTAINER_ID:/pdf-assets ./supplementary_style_guide/pdf-assets
docker cp $CONTAINER_ID:/pdf-assets ./pdf-assets
- name: Build PDF
uses: docker://quay.io/redhat-docs/redhat-docs-pdf-template
with:
args: supplementary_style_guide/main.adoc
- name: Create PDF release
run: |
CURRENT_DATE=$(date +'%Y-%m-%d')
echo v$GITHUB_RUN_NUMBER > version.txt
mv supplementary_style_guide/main.pdf red-hat-supplementary-style-guide.pdf
gh release create "$CURRENT_DATE""_v$GITHUB_RUN_NUMBER" red-hat-supplementary-style-guide.pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}