Skip to content

Commit

Permalink
Clarify description of registries input
Browse files Browse the repository at this point in the history
  • Loading branch information
aeisenberg committed Sep 6, 2022
1 parent bf97a6d commit 376fea6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/__init-with-registries.yml

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

6 changes: 4 additions & 2 deletions init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ inputs:
required: false
registries:
description: |
Use this input only when you need to download CodeQL packages from another instance of GitHub. If you only need to download packages from this GitHub instance, use the token input instead.
A YAML string that defines the list of GitHub container registries to use for downloading packs. The string is in the following form (the | is required on the first line):
registries: |
- url: https://containers.GHEHOSTNAME1/v2/
packages:
- my-company/*
- my-company2/*
token: ${{ secrets.GHEHOSTNAME1_TOKEN }}
token: \$\{{ secrets.GHEHOSTNAME1_TOKEN }}
- url: https://ghcr.io/v2/
packages: */*
token: ${{ secrets.GHCR_TOKEN }}
token: \$\{{ secrets.GHCR_TOKEN }}
The url property contains the URL to the container registry you want to connect to.
Expand Down
2 changes: 1 addition & 1 deletion lib/config-utils.test.js

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

2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pr-checks/checks/init-with-registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ steps:
config-file: ./.github/codeql/codeql-config-registries.yml
languages: javascript
registries: |
- url: "https://ghcr.io/v2/",
packages: "*/*",
- url: "https://ghcr.io/v2/"
packages: "*/*"
token: "${{ secrets.GITHUB_TOKEN }}"
env:
Expand Down
2 changes: 1 addition & 1 deletion src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2296,7 +2296,7 @@ test("downloadPacks-with-registries", async (t) => {
t.deepEqual(process.env.GITHUB_TOKEN, sampleApiDetails.auth);
t.deepEqual(
process.env.CODEQL_REGISTRIES_AUTH,
"http://ghcr.io=not-a-token,https://containers.GHEHOSTNAME1/v2/=still-a-token"
"http://ghcr.io=not-a-token,https://containers.GHEHOSTNAME1/v2/=still-not-a-token"
);

// verify the config file contents were set correctly
Expand Down

0 comments on commit 376fea6

Please sign in to comment.