Skip to content

Commit c459ac5

Browse files
authored
Merge pull request #165 from lool/build-package-workflow-sanitize-inputs
fix(ci): Sanitize workflow inputs with an env var
2 parents f1d93be + 1322194 commit c459ac5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/build-overlay-deb.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
matrix:
1515
arch: [amd64, arm64]
1616
runs-on: [self-hosted, qcom-u2404, "${{ matrix.arch }}"]
17+
env:
18+
CONFIG: ${{ inputs.config }}
1719
container:
1820
image: public.ecr.aws/debian/debian:trixie
1921
options: --privileged # Required for chroot creation
@@ -51,7 +53,7 @@ jobs:
5153
DEBIAN_FRONTEND=noninteractive \
5254
apt -y install --no-install-recommends python3 python3-yaml
5355
# read suite from yaml
54-
suite="$(python3 -c "import yaml; print(yaml.safe_load(open('${{ inputs.config }}'))['suite'])")"
56+
suite="$(python3 -c "import os, yaml; print(yaml.safe_load(open(os.environ['CONFIG']))['suite'])")"
5557
# defaults args
5658
extra_repo=""
5759
debootstrap_suite="${suite}"
@@ -87,7 +89,7 @@ jobs:
8789
mkdir -v upload
8890
chmod a+rw upload
8991
sudo -u builder python3 scripts/build-deb.py \
90-
--config "${{ inputs.config }}" --output-dir upload
92+
--config "$CONFIG" --output-dir upload
9193
9294
- name: Upload as private artifacts
9395
uses: qualcomm-linux/upload-private-artifact-action@v1

0 commit comments

Comments
 (0)