add post script
This commit is contained in:
parent
4d5a705a8d
commit
75370c12a6
21
post.js
Normal file
21
post.js
Normal 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()
|
Loading…
Reference in a new issue