Skip to content

Commit 826edd9

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

2 files changed

Lines changed: 78 additions & 1 deletion

File tree

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

Lines changed: 42 additions & 0 deletions
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

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
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+
]
813

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

0 commit comments

Comments
 (0)