Skip to content

Commit

Permalink
Merge branch 'master' into feature/artifactory-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
afujiwara-roblox authored Mar 5, 2024
2 parents 6c27450 + 80fab84 commit 5cc7243
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,23 @@ If not specified the root job folder will be used.
A boolean value to allow external github orgs in the foreman manifest file.

If not specified, external github orgs will not be allowed.

#### `github-api-url` (optional)
Override for the GitHub API URL. By default GitHub Actions will supply this
value as the current environment, which will usually be
`https://api.github.com`.

This parameter exists primarily to allow GitHub Enterprise to point back to
GitHub Cloud to install publicly hosted tools.

As such, for any use of this action in GitHub Enterprise, `github-api-url`
should be included like so:
```yaml
- uses: Roblox/setup-foreman@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
github-api-url: "https://api.github.com"
```

## License
setup-foreman is available under the MIT license. See [LICENSE.txt](LICENSE.txt) or <https://opensource.org/licenses/MIT> for details.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
working-directory:
required: false
description: 'Working directory to run `foreman install` in'
github-api-url:
required: false
description: 'GitHub API to make requests to'
token:
required: true
description: 'GitHub token from secrets.GITHUB_TOKEN'
Expand Down
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ async function run(): Promise<void> {
const versionReq: string = getInput("version");
const githubToken: string = getInput("token");
const workingDir: string = getInput("working-directory");
const githubApiUrl: string = getInput("github-api-url");
const allowExternalGithubOrgs: string = getInput(
"allow-external-github-orgs"
).toLowerCase();
const artifactoryUrl = getInput("artifactory-url");
const artifactoryToken = getInput("artifactory-token");

const octokit = new GitHub(githubToken);
const octokit = new GitHub(githubToken, {
baseUrl: githubApiUrl
});
const releases = await foreman.getReleases(octokit);
const validReleases = foreman.filterValidReleases(releases);
debug("Choosing release from GitHub API");
Expand Down

0 comments on commit 5cc7243

Please sign in to comment.