From 67f1c1ab9c21c468154005af4413c3f645e15b26 Mon Sep 17 00:00:00 2001 From: Chris Fenner Date: Tue, 10 Sep 2024 20:12:39 -0700 Subject: [PATCH 1/3] reference action by exact commit --- .github/workflows/render.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index e443477..e380e98 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -76,6 +76,11 @@ jobs: key: latex-${{ inputs.input }}-${{ inputs.container-version }}-${{ github.run_id }} restore-keys: latex-${{ inputs.input }}-${{ inputs.container-version }} + # Note: It appears that we can't pass variables into 'uses:' below to allow callers to + # request a version of the action. Referencing it by local path breaks external workflows + # that call to this one. + # The unfortunate workaround is for this file to be updated to point at specific commits + # and reference that version of the action file in this reusable workflow. # Note: It appears that we can't pass variables into 'uses:' below to allow callers to # request a version of the action. Referencing it by local path breaks external workflows # that call to this one. @@ -84,7 +89,7 @@ jobs: # Render the document with diffs in the 'pr' mode. - name: Render if: inputs.workflow == 'pr' - uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 + uses: trustedcomputinggroup/pandoc/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 with: input-md: ${{ inputs.input }} output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }} @@ -95,7 +100,7 @@ jobs: # Render the document with diffs in the 'manual' mode. - name: Render if: inputs.workflow == 'manual' - uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 + uses: trustedcomputinggroup/pandoc/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 with: input-md: ${{ inputs.input }} output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }} @@ -104,7 +109,7 @@ jobs: # Render the document without diffs in other modes. - name: Render if: inputs.workflow != 'pr' && inputs.workflow != 'manual' - uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 + uses: trustedcomputinggroup/pandoc/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 with: input-md: ${{ inputs.input }} output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }} From 201e4e4327317b513c676458d10461e486115f17 Mon Sep 17 00:00:00 2001 From: Chris Fenner Date: Tue, 10 Sep 2024 20:14:47 -0700 Subject: [PATCH 2/3] reference render by full filepath --- .github/workflows/render.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index e380e98..d047bd0 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -89,7 +89,7 @@ jobs: # Render the document with diffs in the 'pr' mode. - name: Render if: inputs.workflow == 'pr' - uses: trustedcomputinggroup/pandoc/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 + uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 with: input-md: ${{ inputs.input }} output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }} @@ -100,7 +100,7 @@ jobs: # Render the document with diffs in the 'manual' mode. - name: Render if: inputs.workflow == 'manual' - uses: trustedcomputinggroup/pandoc/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 + uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 with: input-md: ${{ inputs.input }} output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }} @@ -109,7 +109,7 @@ jobs: # Render the document without diffs in other modes. - name: Render if: inputs.workflow != 'pr' && inputs.workflow != 'manual' - uses: trustedcomputinggroup/pandoc/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 + uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47 with: input-md: ${{ inputs.input }} output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }} From 34ab589ef5b72f713a3ce9f57cc83bb290aba96e Mon Sep 17 00:00:00 2001 From: Chris Fenner Date: Tue, 10 Sep 2024 20:34:36 -0700 Subject: [PATCH 3/3] rename uploaded filename based on input filename --- .github/workflows/render.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index d047bd0..20ce62e 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -123,20 +123,21 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.*.pdf tag: ${{ github.ref }} + asset_name: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.pdf overwrite: true file_glob: true # Always upload all PDF and log files to the workflow artifacts - name: Upload pdfs - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 with: - name: PDF + name: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.pdf path: | ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.*.pdf if: always() - name: Upload logs - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 with: - name: Logs + name: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.log path: | ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}.*.log if: always()