refactor!: make docker-cmd-file backward compatible

This commit is contained in:
Jan Gazda 2024-11-24 23:43:25 +01:00
parent 38513fe30b
commit e5a2162ce4
No known key found for this signature in database
GPG key ID: 9637E36DAE206061
2 changed files with 10 additions and 1 deletions

View file

@ -47,6 +47,10 @@ inputs:
description: |
Override docker docker entrypoint. Use with `docker-user: root`. See the example for usage.
required: false
docker-cmd-file:
description: |
Deprecated, keeping it around for the backward compatibility. Use `docker-entrypoint-file` instead.
required: false
docker-network:
description: |
Docker network.

View file

@ -78,7 +78,12 @@ class Input {
}
getDockerEntrypointFile(): string | null {
const entryPointFile = core.getInput('docker-entrypoint-file');
const cmdFile = core.getInput('docker-entrypoint-file');
const entryPointFile =
!!cmdFile && cmdFile !== ''
? cmdFile
: core.getInput('docker-entrypoint-file');
return !!entryPointFile && entryPointFile !== ''
? path.resolve(entryPointFile)
: null;