Skip to content

Commit

Permalink
writing in output gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
rosven9856 committed Aug 15, 2024
1 parent 7ec5785 commit ebbbf98
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 16 additions & 0 deletions src/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check failure on line 93 in src/Action.php

View workflow job for this annotation

GitHub Actions / psalm (8.3)

PossiblyFalseArgument

src/Action.php:93:27: PossiblyFalseArgument: Argument 1 of file_put_contents cannot be false, possibly string value expected (see https://psalm.dev/104)


$name = 'path';
$value = (string) $this->configuration->get('build.file');

file_put_contents($GITHUB_OUTPUT, "$name=$value\n", FILE_APPEND);

Check failure on line 99 in src/Action.php

View workflow job for this annotation

GitHub Actions / psalm (8.3)

PossiblyFalseArgument

src/Action.php:99:27: PossiblyFalseArgument: Argument 1 of file_put_contents cannot be false, possibly string value expected (see https://psalm.dev/104)
}
}

0 comments on commit ebbbf98

Please sign in to comment.