Abstract the `@actions/*` modules
Most of the logic of this GitHub Action is portable to other CI systems, apart from those functions in @actions/core and @actions/cache.
Introduce an abstraction ICore and a corresponding implementation for GitHub Actions that is just a very thin layer over the @actions/* module functions.
The only logic change here is the introduce of this block:
if (!core.isCacheAvailable()) {
useCache = false
}
Other CI systems may not support caching, so we add a check for this and disable the caching behaviour if not available. For the GitHub Actions implementation of ICore, we could just return true, but there is also an isFeatureAvailable() function in @actions/cache that we should probably have always been checking.
In a future PR I plan to add a very simple 'shim' or wrapper to expose an Azure Pipelines task.
In a future PR I plan to add a very simple 'shim' or wrapper to expose an Azure Pipelines task.
Didn't we move away from Azure Pipelines? Is this a microsoft/git thing? Is this just the CI system that's easiest to produce a proof of concept use of the abstraction for?
In a future PR I plan to add a very simple 'shim' or wrapper to expose an Azure Pipelines task.
Didn't we move away from Azure Pipelines?
Yes, we did. Back when we started this move, the official communication was that Azure DevOps users are highly encouraged to move to GitHub. For... reasons... this seems to have changed.
Is this a microsoft/git thing?
Yes. For... reasons... microsoft/git will need to be built in Azure Pipelines again.
Is this just the CI system that's easiest to produce a proof of concept use of the abstraction for?
It's more like this is the reason for the abstraction.