Skip to content

Commit 763378f

Browse files
authored
fix(ci): require RHOAI Quay bot secrets in params-env (#2559)
Fail loudly with ::error:: when secrets are missing instead of a broken optional if-guard; fork PRs without secrets are unsupported.
1 parent 5e53b08 commit 763378f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/params-env.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ jobs:
4040
cp ci/secrets/pull-secret.json "$HOME/.config/containers/auth.json"
4141
4242
- name: Configure Quay.io pull auth for RHOAI namespace
43-
if: env.RHOAI_QUAY_BOT_USERNAME != ''
4443
run: |
44+
if [ -z "${RHOAI_QUAY_BOT_USERNAME}" ] || [ -z "${RHOAI_QUAY_BOT_PASSWORD}" ]; then
45+
echo "::error title=Missing RHOAI Quay bot secrets::RHOAI_QUAY_BOT_USERNAME and RHOAI_QUAY_BOT_PASSWORD are required for params-env validation. Fork PRs are inherently less secure (GitHub withholds repository secrets) and are unsupported — push a same-repo branch instead. See CONTRIBUTING.md#contributing-from-branches-vs-forks."
46+
exit 1
47+
fi
4548
printf '%s' "${RHOAI_QUAY_BOT_PASSWORD}" | skopeo login --username "${RHOAI_QUAY_BOT_USERNAME}" --password-stdin quay.io
4649
env:
4750
RHOAI_QUAY_BOT_USERNAME: ${{ secrets.RHOAI_QUAY_BOT_USERNAME }}

0 commit comments

Comments
 (0)