Create an Azure Pipelines task wrapper #1248
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #1247
Introduce a new sub-package that is an Azure Pipelines task, that wraps the logic from the GitHub action.
Most of the
@actions/core
functions have 1:1 equivalents in Azure Pipelines, so we can easily port the action logic into an Azure task instead.@actions/cache
doesn't have the same integration, but consumers can use theCache@2
task directly in their pipeline YAML instead.Note that due to difference in the task/action definition schema, some of the input names cannot be exactly the same. Namely the
github-token
action input is not a valid task input, due to the '-
'. We maintain a mapping of GitHub Actions ➡️ Azure Pipelines input names and do the translation in ourICore
implementation.Running
npm run build
followed bynpm run package
will usencc
to compile all the task code into a single index.js file, and then use thetfx
CLI to create a VSIX extension that can be published to the Azure DevOps Marketplace.