From f841ad0309c6e20f024a2fa38539a4b103087170 Mon Sep 17 00:00:00 2001 From: Rafael Sene Date: Wed, 26 Apr 2023 09:15:39 -0300 Subject: [PATCH] Update build-pdf.yml 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 --- .github/workflows/build-pdf.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-pdf.yml b/.github/workflows/build-pdf.yml index efc1e6c..8f34559 100644 --- a/.github/workflows/build-pdf.yml +++ b/.github/workflows/build-pdf.yml @@ -1,4 +1,4 @@ -name: Build RISC-V Doc Spec Template +name: Build Specification on: workflow_dispatch: @@ -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