-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for artifactory auth #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, had a couple questions
@@ -11,6 +11,15 @@ inputs: | |||
token: | |||
required: true | |||
description: 'GitHub token from secrets.GITHUB_TOKEN' | |||
allow-external-github-orgs: | |||
required: false | |||
description: 'Allow installing from external GitHub organizations' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, why was this missing? Does this action.yml
file actually get used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think action.yml
is used to give information about how the action is used, so it would warn that an unknown argument was used when allow-external-github-org
was set. AFAIK, it doesn't affect any functionality
src/main.ts
Outdated
import {downloadTool, extractZip} from "@actions/tool-cache"; | ||
import {GitHub} from "@actions/github"; | ||
import {resolve} from "path"; | ||
import {exec} from "@actions/exec"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but any idea why this formatting is changing? I thought the convention was to have the spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, my local set up might have a different formatter set up. Ill revert this
@@ -84,6 +84,10 @@ async function authenticate(token: string): Promise<void> { | |||
await exec("foreman", ["github-auth", token]); | |||
} | |||
|
|||
async function addArtifactoryToken(url: string, token: string): Promise<void> { | |||
await exec("foreman", ["artifactory-auth", url, token]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, do we need to check the version before we can do this? Or can we just count on the error carrying through and hope that folks can figure it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, we should probably warn if the version selected is below the supported version
Following up with Roblox/foreman#91, this PR looks to add the 'artifactory-url' and artifactory-token' parameter to have foreman authenticate with artifactory.