Skip to content
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

Merged
merged 10 commits into from
Mar 29, 2024
Merged

Conversation

afujiwara-roblox
Copy link
Contributor

Following up with Roblox/foreman#91, this PR looks to add the 'artifactory-url' and artifactory-token' parameter to have foreman authenticate with artifactory.

@afujiwara-roblox afujiwara-roblox changed the title Add suppoer for artifactory auth Add support for artifactory auth Mar 5, 2024
Copy link
Contributor

@ZoteTheMighty ZoteTheMighty left a 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'
Copy link
Contributor

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?

Copy link
Contributor Author

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";
Copy link
Contributor

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.

Copy link
Contributor Author

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]);
Copy link
Contributor

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?

Copy link
Contributor Author

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

@afujiwara-roblox afujiwara-roblox merged commit 7e947e4 into master Mar 29, 2024
9 checks passed
@afujiwara-roblox afujiwara-roblox deleted the feature/artifactory-auth branch March 29, 2024 18:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants