gpg/src/state-helper.ts
Jose Celano 11e26b9f0b
Fix error deleting keys with short key id (#129)
Error:

```
gpg: can't do this in batch mode
```

The GPG command:

```
gpg --batch --yes --delete-secret-keys FINGERPRINT
```

requires to use a fingerprint if you use the `--batch` option.

We were using the short ID of the primary key.
2022-03-03 14:48:37 +01:00

12 lines
317 B
TypeScript

import * as core from '@actions/core';
export const IsPost = !!process.env['STATE_isPost'];
export const fingerprint = process.env['STATE_fingerprint'] || '';
export function setFingerprint(fingerprint: string) {
core.saveState('fingerprint', fingerprint);
}
if (!IsPost) {
core.saveState('isPost', 'true');
}