Skip to content

Commit

Permalink
Merge pull request #565 from github/robertbrignull/upload_ghes
Browse files Browse the repository at this point in the history
Only attempt to upload on dotcom
  • Loading branch information
robertbrignull authored Jun 17, 2021
2 parents 6fc1280 + b985a67 commit 69c30da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/analyze-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ async function uploadDatabases(
apiDetails: GitHubApiDetails,
logger: Logger
): Promise<void> {
// Do nothing when not running against github.com
if (config.gitHubVersion.type !== util.GitHubVariant.DOTCOM) {
logger.debug("Not running against github.com. Skipping upload.");
return;
}

if (!(await actionsUtil.isAnalyzingDefaultBranch())) {
// We only want to upload a database if we are analyzing the default branch.
logger.debug("Not analyzing default branch. Skipping upload.");
Expand Down

0 comments on commit 69c30da

Please sign in to comment.