Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support output parameters to expose installed edge #396

Merged
merged 7 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ steps:
run: (Get-Item (Get-Command msedge).Source).VersionInfo.ProductVersion
```

## Parameters
### Input

- `edge-version`:
*(Optional)* The Edge version to be installed. Supported versions are "stable", "beta", "dev", and "canary". Default: `stable`.

### Output

- `edge-version`: The installed Edge version. Useful when given a latest version.
- `edge-path`: The installed Edge path.

## License

[MIT](LICENSE)
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:
The Edge version to be installed. Supported versions are "stable", "beta", "dev"
default: stable
required: false
outputs:
edge-version:
description: 'The installed Edge version. Useful when given a latest version.'
edge-path:
description: 'The installed Edge path.'
runs:
using: 'node16'
main: 'index.js'
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ async function run(): Promise<void> {
const result = await installer.install(version, downloaded.archive);
core.info(`Successfully setup Edge ${version}`);

core.setOutput("edge-version", version);
core.setOutput("edge-path", path.join(result.root, result.bin));

return result;
})();

Expand Down