Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f6166f02c | ||
|
|
2712ed55b1 | ||
|
|
01976c9d9b | ||
|
|
78a39ce0df |
@@ -2,6 +2,15 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [3.5.4-3](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-2...v3.5.4-3) (2020-03-14)
|
||||
|
||||
|
||||
### fix
|
||||
|
||||
* skip logic ([01976c9](https://github.com/peaceiris/actions-gh-pages/commit/01976c9d9b95b42997caa2a85c2d737eb75e852e))
|
||||
|
||||
|
||||
|
||||
## [3.5.4-2](https://github.com/peaceiris/actions-gh-pages/compare/v3.5.4-1...v3.5.4-2) (2020-03-14)
|
||||
|
||||
|
||||
|
||||
15
lib/index.js
15
lib/index.js
@@ -2763,13 +2763,14 @@ exports.addCNAME = addCNAME;
|
||||
function skipOnFork(githubToken, deployKey, personalToken) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const isForkRepository = github_1.context.payload.repository.fork === 'true';
|
||||
if (isForkRepository && deployKey === '') {
|
||||
core.warning('Action runs on fork and deploy_key is empty');
|
||||
return true;
|
||||
}
|
||||
if (isForkRepository && personalToken === '') {
|
||||
core.warning('Action runs on fork and personalToken is empty');
|
||||
return true;
|
||||
if (isForkRepository) {
|
||||
if (githubToken) {
|
||||
return false;
|
||||
}
|
||||
if (!deployKey && !personalToken) {
|
||||
core.warning('Action runs on fork and deploy_key or personal_token is empty');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.5.4-2",
|
||||
"version": "3.5.4-3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "actions-github-pages",
|
||||
"version": "3.5.4-2",
|
||||
"version": "3.5.4-3",
|
||||
"description": "GitHub Actions for GitHub Pages",
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
|
||||
17
src/utils.ts
17
src/utils.ts
@@ -73,14 +73,17 @@ export async function skipOnFork(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(context.payload as any).repository.fork === 'true';
|
||||
|
||||
if (isForkRepository && deployKey === '') {
|
||||
core.warning('Action runs on fork and deploy_key is empty');
|
||||
return true;
|
||||
}
|
||||
if (isForkRepository) {
|
||||
if (githubToken) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isForkRepository && personalToken === '') {
|
||||
core.warning('Action runs on fork and personalToken is empty');
|
||||
return true;
|
||||
if (!deployKey && !personalToken) {
|
||||
core.warning(
|
||||
'Action runs on fork and deploy_key or personal_token is empty'
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user