Skip to content

Commit

Permalink
Force failure of the init-with-registries job
Browse files Browse the repository at this point in the history
  • Loading branch information
aeisenberg committed Feb 6, 2023
1 parent 328773c commit 826edd9
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/__init-with-registries.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 36 additions & 1 deletion pr-checks/checks/init-with-registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# basic mechanics of multi-registry auth is working.
name: "Packaging: Download using registries"
description: "Checks that specifying a registries block and associated auth works as expected"
versions: ["nightly-latest"] # This feature is not compatible with old CLIs
versions: [
# This feature is not compatible with older CLIs
"cached",
"latest",
"nightly-latest",
]

steps:
- name: Init with registries
Expand Down Expand Up @@ -40,3 +45,33 @@ steps:
echo "::error $CODEQL_PACK1 pack was not installed."
exit 1
fi
- name: Verify qlconfig.yml file was created
shell: bash
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
echo "Expected qlconfig.yml file to be created at $QLCONFIG_PATH"
if [[ -f $QLCONFIG_PATH ]]
then
echo "qlconfig.yml file was created."
else
echo "::error qlconfig.yml file was not created."
exit 1
fi
- name: Verify contents of qlconfig.yml
# yq is not available on windows
if: runner.os != 'Windows'
shell: bash
run: |
QLCONFIG_PATH=$RUNNER_TEMP/qlconfig.yml
cat $QLCONFIG_PATH | yq -e '.registries[] | select(.url == "https://ghcr.io/v2/") | select(.packages == "*/*")'
if [[ $? -eq 0 ]]
then
echo "Registry was added to qlconfig.yml file."
else
echo "::error Registry was not added to qlconfig.yml file."
echo "Contents of qlconfig.yml file:"
cat $QLCONFIG_PATH
exit 1
fi

0 comments on commit 826edd9

Please sign in to comment.