mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-22 13:00:56 -05:00
Check private key deletion
This commit is contained in:
parent
be8040e6d7
commit
ee885cc34c
3 changed files with 4 additions and 3 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -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
3
dist/index.js
generated
vendored
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue