From d2316507fdc206ec21aef058b2cbcb47c02391c8 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Sat, 9 May 2020 20:47:42 +0700 Subject: [PATCH] Inspect isPost --- action.yml | 1 + src/index.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9de6293..b204427 100644 --- a/action.yml +++ b/action.yml @@ -26,3 +26,4 @@ inputs: runs: using: node12 main: dist/index.js + post: dist/index.js diff --git a/src/index.ts b/src/index.ts index 4273417..c8eaa19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,15 @@ -import { setFailed } from '@actions/core' +import { setFailed, getState, debug } from '@actions/core' import getInputs from './inputs' import setOutputs from './outputs' import installPnpm from './install-pnpm' import pnpmInstall from './pnpm-install' async function main() { + const isPost = getState('isPost') + debug(JSON.stringify(isPost)) + if (isPost) { + return + } const inputs = getInputs() await installPnpm(inputs) console.log('Installation Completed!')