[CI] test built

This commit is contained in:
peter-evans 2020-08-19 03:34:25 +00:00 committed by GitHub
parent a755ad5ffb
commit 1aeca21888
2 changed files with 8 additions and 5 deletions

12
dist/index.js vendored
View file

@ -7656,11 +7656,13 @@ function createPullRequest(inputs) {
throw new Error('The checked out ref is not a valid base for a pull request. Unable to continue.');
}
const workingBase = symbolicRefResult.stdout.trim();
// Exit if the working base is a PR branch created by this action.
// This may occur when using a PAT instead of GITHUB_TOKEN because
// a PAT allows workflow actions to trigger further events.
if (workingBase.startsWith(inputs.branch)) {
throw new Error(`Working base branch '${workingBase}' was created by this action. Unable to continue.`);
// If the base is not specified it is assumed to be the working base.
const base = inputs.base ? inputs.base : workingBase;
// Throw an error if the base and branch are not different branches
// of the 'origin' remote. An identically named branch in the `fork`
// remote is perfectly fine.
if (branchRemoteName == 'origin' && base == inputs.branch) {
throw new Error(`The 'base' and 'branch' for a pull request must be different branches. Unable to continue.`);
}
core.endGroup();
// Apply the branch suffix if set

1
report.txt Normal file
View file

@ -0,0 +1 @@
1597808065