add post script

This commit is contained in:
Dawid Dziurla 2020-12-09 23:07:13 +01:00
parent 4d5a705a8d
commit 75370c12a6
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B

21
post.js Normal file
View file

@ -0,0 +1,21 @@
const core = require("@actions/core")
const exec = require("@actions/exec")
async function main() {
try {
const container = core.getState("container")
core.saveState("container", "")
if (container) {
await exec.exec("docker", [
"rm",
"--force",
container
])
}
} catch (error) {
core.setFailed(error.message)
}
}
main()