mirror of
https://github.com/github/codeql-action.git
synced 2026-04-02 17:52:19 +00:00
Clarify description of registries input
This commit is contained in:
10
.github/workflows/__init-with-registries.yml
generated
vendored
10
.github/workflows/__init-with-registries.yml
generated
vendored
@@ -66,13 +66,9 @@ jobs:
|
||||
config-file: ./.github/codeql/codeql-config-registries.yml
|
||||
languages: javascript
|
||||
registries: |
|
||||
[
|
||||
{
|
||||
"url": "https://ghcr.io/v2/",
|
||||
"packages": "*/*",
|
||||
"token": "${{ secrets.GITHUB_TOKEN }}"
|
||||
}
|
||||
]
|
||||
- url: "https://ghcr.io/v2/"
|
||||
packages: "*/*"
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
env:
|
||||
TEST_MODE: true
|
||||
|
||||
@@ -15,6 +15,8 @@ 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: |
|
||||
@@ -22,11 +24,11 @@ inputs:
|
||||
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.
|
||||
|
||||
|
||||
2
lib/config-utils.test.js
generated
2
lib/config-utils.test.js
generated
@@ -1139,7 +1139,7 @@ const calculateAugmentationErrorMacro = ava_1.default.macro({
|
||||
t.deepEqual(configFile, expectedConfigFile);
|
||||
// verify the env vars were set correctly
|
||||
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");
|
||||
t.deepEqual(process.env.CODEQL_REGISTRIES_AUTH, "http://ghcr.io=not-a-token,https://containers.GHEHOSTNAME1/v2/=still-not-a-token");
|
||||
// verify the config file contents were set correctly
|
||||
const config = yaml.load(fs.readFileSync(configFile, "utf8"));
|
||||
t.deepEqual(config.registries, registries.map((r) => ({ url: r.url, packages: r.packages })));
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user