Skip to content

Commit

Permalink
add post script
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidd6 committed May 7, 2020
1 parent 9fa54a3 commit 6249522
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const core = require('@actions/core')
const fs = require('fs')

function rm(file) {
core.info(`==> Deleting "${file}" file`)
fs.unlinkSync(file)
}

async function main() {
try {
const keyFile = core.getState("keyFile")
const inventoryFile = core.getState("inventoryFile")
const vaultPasswordFile = core.getState("vaultPasswordFile")

if (keyFile)
rm(keyFile)

if (inventoryFile)
rm(inventoryFile)

if (vaultPasswordFile)
rm(vaultPasswordFile)
} catch (error) {
core.setFailed(error.message)
}
}

main()

0 comments on commit 6249522

Please sign in to comment.