Merge pull request #514 from apinnick/oadp-bsl #103
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: 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 }} |