diff --git a/action.yml b/action.yml index 30973ef..de3a00f 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,11 @@ inputs: BUILD_FILE_NAME: description: "package file name" default: "package.zip" +outputs: + directory: + description: 'The path to the building directory' + path: + description: 'The path to the compiled package archive' runs: using: "docker" image: "action.Dockerfile" diff --git a/src/Action.php b/src/Action.php index ca93f39..88c57fd 100644 --- a/src/Action.php +++ b/src/Action.php @@ -81,5 +81,21 @@ public function run() } $zip->close(); + + + + $GITHUB_OUTPUT = getenv('GITHUB_OUTPUT'); + + + $name = 'directory'; + $value = (string) $this->configuration->get('build.directory'); + + file_put_contents($GITHUB_OUTPUT, "$name=$value\n", FILE_APPEND); + + + $name = 'path'; + $value = (string) $this->configuration->get('build.file'); + + file_put_contents($GITHUB_OUTPUT, "$name=$value\n", FILE_APPEND); } }