mirror of
https://github.com/github/codeql-action
synced 2026-05-25 15:00:36 +03:00
Extend start-proxy.yml to test multiple registry support
This commit is contained in:
@@ -16,7 +16,17 @@ steps:
|
||||
id: proxy
|
||||
uses: ./../action/start-proxy
|
||||
with:
|
||||
registry_secrets: '[{ "type": "nuget_feed", "url": "https://api.nuget.org/v3/index.json" }]'
|
||||
registry_secrets: |
|
||||
[
|
||||
{
|
||||
"type": "maven-repository",
|
||||
"url": "https://acme.jfrog.io/artifactory/my-maven-registry"
|
||||
},
|
||||
{
|
||||
"type": "maven-repository",
|
||||
"url": "https://repo1.maven.org/maven2"
|
||||
}
|
||||
]
|
||||
|
||||
- name: Print proxy outputs
|
||||
run: |
|
||||
@@ -27,3 +37,15 @@ steps:
|
||||
- name: Fail if proxy outputs are not set
|
||||
if: (!steps.proxy.outputs.proxy_host) || (!steps.proxy.outputs.proxy_port) || (!steps.proxy.outputs.proxy_ca_certificate) || (!steps.proxy.outputs.proxy_urls)
|
||||
run: exit 1
|
||||
|
||||
- name: Validate proxy_urls contains expected registries
|
||||
env:
|
||||
PROXY_URLS: ${{ steps.proxy.outputs.proxy_urls }}
|
||||
run: |
|
||||
jq --null-input --exit-status '
|
||||
env.PROXY_URLS
|
||||
| fromjson
|
||||
| length == 2 and
|
||||
any(.[]; .type=="maven-repository" and .url=="https://acme.jfrog.io/artifactory/my-maven-registry") and
|
||||
any(.[]; .type=="maven-repository" and .url=="https://repo1.maven.org/maven2")
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user