Skip to content

Commit 3edf47d

Browse files
committed
Fix for zizmor
1 parent 0cebfe9 commit 3edf47d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/actions/setup/ubuntu/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ runs:
3333
setarch="${arch:+setarch $arch --}"
3434
# normalize `uname`
3535
if uname=$(${setarch} uname -m 2> /dev/null); then
36+
# `setarch` works, `$arch` is a valid architecture name.
3637
echo "setarch=${setarch}" >> "$GITHUB_OUTPUT"
3738
else
3839
# if `setarch` failed, take the given `arch` as-is.
@@ -46,13 +47,15 @@ runs:
4647
shell: bash
4748
run: echo "SETARCH=${setarch}" >> "$GITHUB_ENV" # zizmor: ignore[github-env]
4849
env:
49-
setarch: ${{ steps.uname.outputs.setarch }}
50+
setarch: ${{ steps.uname.outputs.setarch }} # validated
5051

5152
- name: dpkg setup
5253
shell: bash
53-
run: |
54-
sudo dpkg --add-architecture ${{ steps.uname.outputs.dpkg }}
54+
run: sudo dpkg --add-architecture "${dpkg}"
55+
# `dpkg` is valid, also `uname`.
5556
if: ${{ inputs.arch }}
57+
env:
58+
dpkg: ${{ steps.uname.outputs.dpkg }}
5659

5760
- name: apt-get
5861
shell: bash

0 commit comments

Comments
 (0)