Skip to content

Commit

Permalink
Update build-pdf.yml
Browse files Browse the repository at this point in the history
This change adds a variable that collects the repository name and append it as part of the PDF generated by the build process.

Signed-off-by: Rafael Sene <[email protected]>
  • Loading branch information
rpsene authored Apr 26, 2023
1 parent 4810a50 commit f841ad0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build-pdf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build RISC-V Doc Spec Template
name: Build Specification

on:
workflow_dispatch:
Expand Down Expand Up @@ -29,14 +29,16 @@ jobs:
run: |
docker run --rm -v ${{ github.workspace }}:/build riscvintl/riscv-docs-base-container-image:latest \
/bin/sh -c 'make'
# Set the short SHA for use in artifact names
- name: Set short SHA
run: echo "SHORT_SHA=$(echo ${GITHUB_SHA::7})" >> $GITHUB_ENV
# Set the short SHA and repo name for use in artifact names
- name: Set short SHA and repo name
run: |
echo "SHORT_SHA=$(echo ${GITHUB_SHA::7})" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${GITHUB_REPOSITORY##*/})" >> $GITHUB_ENV
# Upload the built PDF file as artifact
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: spec-sample-${{ env.SHORT_SHA }}.pdf
path: ${{ github.workspace }}/spec-sample.pdf
name: ${{ env.REPO_NAME }}-${{ env.SHORT_SHA }}.pdf
path: ${{ github.workspace }}/*.pdf
retention-days: 7

0 comments on commit f841ad0

Please sign in to comment.