mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2025-02-07 15:21:10 +01:00
15 lines
503 B
TypeScript
15 lines
503 B
TypeScript
|
// From https://github.com/actions/checkout/blob/master/src/state-helper.ts
|
||
|
|
||
|
import * as coreCommand from '@actions/core/lib/command';
|
||
|
|
||
|
/**
|
||
|
* Indicates whether the POST action is running
|
||
|
*/
|
||
|
export const IsPost = !!process.env['STATE_isPost'];
|
||
|
|
||
|
// Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
|
||
|
// This is necessary since we don't have a separate entry point.
|
||
|
if (!IsPost) {
|
||
|
coreCommand.issueCommand('save-state', {name: 'isPost'}, 'true');
|
||
|
}
|