Skip to content

Commit 75fa980

Browse files
committed
Force failure of the init-with-registries job
1 parent 328773c commit 75fa980

File tree

2 files changed

+83
-1
lines changed

2 files changed

+83
-1
lines changed

.github/workflows/__init-with-registries.yml

+44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/init-with-registries.yml

+39-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
# basic mechanics of multi-registry auth is working.
55
name: "Packaging: Download using registries"
66
description: "Checks that specifying a registries block and associated auth works as expected"
7-
versions: ["nightly-latest"] # This feature is not compatible with old CLIs
7+
versions: [
8+
# This feature is not compatible with older CLIs
9+
"cached",
10+
"latest",
11+
"nightly-latest",
12+
]
13+
14+
env:
15+
CODEQL_PASS_CONFIG_TO_CLI: 'true'
816

917
steps:
1018
- name: Init with registries
@@ -40,3 +48,33 @@ steps:
4048
echo "::error $CODEQL_PACK1 pack was not installed."
4149
exit 1
4250
fi
51+
52+
- name: Verify qlconfig.yml file was created
53+
shell: bash
54+
run: |
55+
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
56+
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
57+
if [[ -f $QLCONFIG_PATH ]]
58+
then
59+
echo "qlconfig.yml file was created."
60+
else
61+
echo "::error qlconfig.yml file was not created."
62+
exit 1
63+
fi
64+
65+
- name: Verify contents of qlconfig.yml
66+
# yq is not available on windows
67+
if: runner.os != 'Windows'
68+
shell: bash
69+
run: |
70+
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
71+
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'
72+
if [[ $? -eq 0 ]]
73+
then
74+
echo "Registry was added to qlconfig.yml file."
75+
else
76+
echo "::error Registry was not added to qlconfig.yml file."
77+
echo "Contents of qlconfig.yml file:"
78+
cat $QLCONFIG_PATH
79+
exit 1
80+
fi

0 commit comments

Comments
 (0)