Skip to content

Commit 976d69d

Browse files
authored
use pandoc action from pandoc repo instead of local path (#180)
* use pandoc action from pandoc repo instead of local path * reference action by exact commit * reference render by full filepath * add note about commit hash of reusable action
1 parent 8f79b56 commit 976d69d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/actions/render/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Reminder: Due to the way GitHub Actions treats reusable workflows that use reusable actions from local paths,
2+
# we have to update .github/workflows/render.yml to point to a particular commit of this file.
3+
# This means that when updating this file, we have to first send a PR that updates the action,
4+
# then second send a PR send that uses the action in the reusable workflow.
5+
16
name: 'Render'
27
description: 'Render a TCG Markdown document'
38
inputs:

.github/workflows/render.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,15 @@ jobs:
7676
key: latex-${{ inputs.input }}-${{ inputs.container-version }}-${{ github.run_id }}
7777
restore-keys: latex-${{ inputs.input }}-${{ inputs.container-version }}
7878

79+
# Note: It appears that we can't pass variables into 'uses:' below to allow callers to
80+
# request a version of the action. Referencing it by local path breaks external workflows
81+
# that call to this one.
82+
# The unfortunate workaround is for this file to be updated to point at specific commits
83+
# and reference that version of the action file in this reusable workflow.
7984
# Render the document with diffs in the 'pr' mode.
8085
- name: Render
8186
if: inputs.workflow == 'pr'
82-
uses: ./.github/actions/render
87+
uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47
8388
with:
8489
input-md: ${{ inputs.input }}
8590
output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}
@@ -90,7 +95,7 @@ jobs:
9095
# Render the document with diffs in the 'manual' mode.
9196
- name: Render
9297
if: inputs.workflow == 'manual'
93-
uses: ./.github/actions/render
98+
uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47
9499
with:
95100
input-md: ${{ inputs.input }}
96101
output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}
@@ -99,7 +104,7 @@ jobs:
99104
# Render the document without diffs in other modes.
100105
- name: Render
101106
if: inputs.workflow != 'pr' && inputs.workflow != 'manual'
102-
uses: ./.github/actions/render
107+
uses: trustedcomputinggroup/pandoc/.github/actions/render@8f79b567c9dc6b15afba5d83d61e0d37f9508c47
103108
with:
104109
input-md: ${{ inputs.input }}
105110
output-basename: ${{ steps.gen_output_name.outputs.OUTPUT_FILENAME }}

0 commit comments

Comments
 (0)