Check private key deletion

This commit is contained in:
CrazyMax 2020-05-03 21:17:25 +02:00
parent be8040e6d7
commit ee885cc34c
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
3 changed files with 4 additions and 3 deletions

View file

@ -24,5 +24,4 @@ jobs:
name: Import GPG key
uses: ./
env:
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY_TEST }}

3
dist/index.js generated vendored
View file

@ -126,7 +126,7 @@ function run() {
core.debug(`key.fingerprint=${privateKey.fingerprint}`);
core.debug(`key.keyID=${privateKey.keyID}`);
core.debug(`key.userID=${privateKey.userID}`);
core.debug(`key.creationTime: ${privateKey.creationTime}`);
core.debug(`key.creationTime=${privateKey.creationTime}`);
core.info('🔑 Importing secret key...');
yield gpg_1.importKey(process.env.SIGNING_KEY);
}
@ -138,6 +138,7 @@ function run() {
function cleanup() {
return __awaiter(this, void 0, void 0, function* () {
if (!privateKey) {
core.debug('Private key is not defined. Skipping cleanup.');
return;
}
try {

View file

@ -20,7 +20,7 @@ async function run(): Promise<void> {
core.debug(`key.fingerprint=${privateKey.fingerprint}`);
core.debug(`key.keyID=${privateKey.keyID}`);
core.debug(`key.userID=${privateKey.userID}`);
core.debug(`key.creationTime: ${privateKey.creationTime}`);
core.debug(`key.creationTime=${privateKey.creationTime}`);
core.info('🔑 Importing secret key...');
await importKey(process.env.SIGNING_KEY);
@ -31,6 +31,7 @@ async function run(): Promise<void> {
async function cleanup(): Promise<void> {
if (!privateKey) {
core.debug('Private key is not defined. Skipping cleanup.');
return;
}
try {