Skip to content

Commit 9ba4d50

Browse files
authored
Merge pull request #1221 from github/aeisenberg/ghes-pack-download
Add support for downloading packs from GHES
2 parents 21ae865 + 6085805 commit 9ba4d50

26 files changed

+858
-122
lines changed

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

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

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [UNRELEASED]
44

5-
No user facing changes.
5+
- Allow CodeQL packs to be downloaded from GitHub Enterprise Server instances, using the new `registries` input for the `init` action. [#1221](https://github.com/github/codeql-action/pull/1221)
66

77
## 2.1.22 - 01 Sep 2022
88

@@ -42,7 +42,7 @@ No user facing changes.
4242
## 2.1.15 - 28 Jun 2022
4343

4444
- CodeQL query packs listed in the `packs` configuration field will be skipped if their target language is not being analyzed in the current Actions job. Previously, this would throw an error. [#1116](https://github.com/github/codeql-action/pull/1116)
45-
- The combination of python2 and poetry is no longer supported. See https://github.com/actions/setup-python/issues/374 for more details. [#1124](https://github.com/github/codeql-action/pull/1124)
45+
- The combination of python2 and poetry is no longer supported. See <https://github.com/actions/setup-python/issues/374> for more details. [#1124](https://github.com/github/codeql-action/pull/1124)
4646
- Update default CodeQL bundle version to 2.10.0. [#1123](https://github.com/github/codeql-action/pull/1123)
4747

4848
## 2.1.14 - 22 Jun 2022

init/action.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,34 @@ inputs:
1010
description: The languages to be analysed
1111
required: false
1212
token:
13+
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
1314
default: ${{ github.token }}
15+
required: false
16+
registries:
17+
description: |
18+
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.
19+
20+
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):
21+
22+
registries: |
23+
- url: https://containers.GHEHOSTNAME1/v2/
24+
packages:
25+
- my-company/*
26+
- my-company2/*
27+
token: \$\{{ secrets.GHEHOSTNAME1_TOKEN }}
28+
29+
- url: https://ghcr.io/v2/
30+
packages: */*
31+
token: \$\{{ secrets.GHCR_TOKEN }}
32+
33+
The `url` property contains the URL to the container registry you want to connect to.
34+
35+
The `packages` property contains a single glob string or a list of glob strings, specifying which packages should be retrieved from this particular container registry. Order is important. Earlier entries will match before later entries.
36+
37+
The `token` property contains a connection token for this registry. required: false
1438
matrix:
1539
default: ${{ toJson(matrix) }}
40+
required: false
1641
config-file:
1742
description: Path of the config file to use
1843
required: false
@@ -32,7 +57,7 @@ inputs:
3257
analyses, you must specify packs in the codeql-config.yml file.
3358
required: false
3459
external-repository-token:
35-
description: A token for fetching external config files and queries if they reside in a private repository.
60+
description: A token for fetching external config files and queries if they reside in a private repository in the same GitHub instance that is running this action.
3661
required: false
3762
setup-python-dependencies:
3863
description: Try to auto-install your python dependencies
@@ -82,4 +107,4 @@ outputs:
82107
runs:
83108
using: 'node16'
84109
main: '../lib/init-action.js'
85-
post: '../lib/init-action-post.js'
110+
post: '../lib/init-action-post.js'

lib/codeql.js

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

lib/codeql.js.map

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

lib/codeql.test.js

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

lib/codeql.test.js.map

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

lib/config-utils.js

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

lib/config-utils.js.map

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

0 commit comments

Comments
 (0)