feat: Add GHES support 🏢 (#580)

Changes for #579

Co-authored-by: dom <dominik.meyer01@sap.com>
This commit is contained in:
Dominik Meyer
2021-03-09 12:51:31 +01:00
committed by GitHub
parent a0db9b66be
commit 3623583f73
8 changed files with 61 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ import * as exec from '@actions/exec';
import * as glob from '@actions/glob';
import path from 'path';
import fs from 'fs';
import {URL} from 'url';
import {Inputs, CmdResult} from './interfaces';
import {createDir} from './utils';
import {cp, rm} from 'shelljs';
@@ -13,6 +14,10 @@ export async function createBranchForce(branch: string): Promise<void> {
return;
}
export function getServerUrl(): URL {
return new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
}
export async function deleteExcludedAssets(destDir: string, excludeAssets: string): Promise<void> {
if (excludeAssets === '') return;
core.info(`[INFO] delete excluded assets`);