1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-12 09:01:36 +02:00

feat: support proxy configuration (#621)

support proxy configuration
This commit is contained in:
Julian Li
2022-11-09 13:03:38 +11:00
committed by GitHub
parent 27bceafeb6
commit 714f07f3ae
4 changed files with 24 additions and 4 deletions

View File

@@ -19,7 +19,8 @@ function getGitHubInput () {
repoUrl: core.getInput('repo-url') || process.env.GITHUB_REPOSITORY,
apiUrl: core.getInput('github-api-url') || GITHUB_API_URL,
graphqlUrl: (core.getInput('github-graphql-url') || '').replace(/\/graphql$/, '') || GITHUB_GRAPHQL_URL,
token: core.getInput('token', { required: true })
token: core.getInput('token', { required: true }),
proxyServer: core.getInput('proxy-server') || undefined
}
}
@@ -105,9 +106,16 @@ const releasePlease = {
}
function getGitHubInstance () {
const { token, defaultBranch, apiUrl, graphqlUrl, repoUrl } = getGitHubInput()
const { token, defaultBranch, apiUrl, graphqlUrl, repoUrl, proxyServer } = getGitHubInput()
const [owner, repo] = repoUrl.split('/')
let proxy
if (proxyServer) {
const [host, port] = proxyServer.split(':')
proxy = { host, port }
}
const githubCreateOpts = {
proxy,
owner,
repo,
apiUrl,