Skip to content

Commit 897f223

Browse files
committed
ci: move input interpolation into an intermediate environment variable
best practice according to: https://docs.github.com/en/actions/reference/security/secure-use#use-an-intermediate-environment-variable
1 parent e271305 commit 897f223

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/actions/make/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ runs:
4040
- name: compute artifact key
4141
shell: bash -euo pipefail {0}
4242
id: compute-key
43+
env:
44+
INPUTS_KEY: ${{ inputs.key }}
45+
MAKE_RULE: ${{ inputs.make-rule }}
4346
run: |
44-
files_hash=$($MAKE "${{ inputs.make-rule }}"-hash-deps)
47+
files_hash=$($MAKE "${MAKE_RULE}"-hash-deps)
4548
# Change the ARTIFACT_GENERATION repository variable to force fresh artifacts
46-
echo "key=${{ inputs.key }}-$files_hash-${{ inputs.artifact-generation }}" >> "$GITHUB_OUTPUT"
49+
echo "key=${INPUT_KEY}-$files_hash-${{ inputs.artifact-generation }}" >> "$GITHUB_OUTPUT"
4750
- name: branch name
4851
id: branch-name
4952
run: |

0 commit comments

Comments
 (0)