8000 feat(*): next try · shiftcode/github-action-skip@b29212e · GitHub
[go: up one dir, main page]

Skip to content

Commit b29212e

Browse files
feat(*): next try
1 parent f4b8b04 commit b29212e

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ This example shows how to setup two dependant jobs, the second will only be exec
1414
checkExecution:
1515
runs-on: ubuntu-latest
1616
outputs:
17-
shouldExecute: ${{steps.step1.outputs.shouldExecute}}
17+
shouldExecute: ${{ steps.stepCheckExecution.outputs.shouldExecute }}
1818
steps:
19-
- name: Check for execution
19+
- id: stepCheckExecution
20+
name: Check for execution
2021
uses: shiftcode/github-action-skip@releases/v2-alpha.0
2122
with:
22-
skipOnCommitMsg: "[skip_workflow]"
23-
build:
23+
skipOnCommitMsg: "[skip_build]"
24+
githubToken: ${{secrets.GH_TOKEN_3}}
25+
build:
2426
runs-on: ubuntu-latest
2527
needs: checkExecution
26-
if: needs.checkExecution.outputs.shouldExecute
27-
steps:
28+
# only execute if not skipped by commit message
29+
if: needs.checkExecution.outputs.shouldExecute == 'true'
30+
steps: ...
2831
```
2932
3033
## Publish to a distribution branch

lib/octokit-lab.js renamed to lib/lab.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
2222
const rest_1 = require("@octokit/rest");
2323
const https = __importStar(require("https"));
2424
const token = process.env.GH_TOKEN;
25-
console.log(token);
26-
const sha = 'fd3d6b191cf773f68ca6dfc57bc52e28513fd8d1';
25+
const sha = process.env.GH_SHA;
26+
console.log(`try resolving commit for sha ${sha} using gh token ${token}`);
2727
runWithOctokit()
2828
.then(() => runOther());
2929
async function runWithOctokit() {

node_modules/.package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "typescript-action",
3-
"version": "0.0.0",
2+
"name": "github-action-skip",
3+
"version": "2.0.0",
44
"private": true,
55
"description": "action to skip a github action based on input",
66
"main": "lib/main.js",

src/octokit-lab.ts renamed to src/lab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Octokit } from '@octokit/rest'
22
import * as https from 'https'
33

44
const token = process.env.GH_TOKEN
5-
console.log(token)
6-
const sha = 'fd3d6b191cf773f68ca6dfc57bc52e28513fd8d1'
5+
const sha = process.env.GH_SHA
6+
console.log(`try resolving commit for sha ${sha} using gh token ${token}`)
77

88
runWithOctokit()
99
.then(() => runOther())

0 commit comments

Comments
 (0)
0