From ff8bf47b42b1fd8eac8cfadbdb485fe946942914 Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Wed, 25 Jan 2023 11:17:31 -0500 Subject: [PATCH 1/2] feat: actually execute post action --- src/main.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 5f9ad4f..ab12046 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,10 +1,17 @@ import { debug, getState, setFailed } from '@actions/core' import { setupKubeconfig } from 'login' import { installKubectl } from 'setup' +import { teardown } from 'teardown' -const post = Boolean(getState('isPost')) - -if (!post) { +if (getState('kubectl-path')) { + debug('Running post kubectl-action setup') + teardown() + // eslint-disable-next-line unicorn/prefer-top-level-await + .catch(error => { + setFailed('Failed to install kubectl (this is a bug in kubectl-action): ') + debug(JSON.stringify(error)) + }) +} else { debug('Running kubectl-action setup') // eslint-disable-next-line no-async-promise-executor new Promise(async () => { From 8c4badf72acb8e96064aaec0e530fc0bc43abb64 Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Wed, 25 Jan 2023 11:18:36 -0500 Subject: [PATCH 2/2] chore: v1.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e597145..5143318 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kubectl-action", - "version": "1.1.1", + "version": "1.1.2", "scripts": { "dev": "ncc -smw --license licenses.txt build src/main.ts", "build": "ncc -sm --license licenses.txt build src/main.ts",