1.1.8 • Published 11 months ago
@google-github-actions/setup-cloud-sdk v1.1.8
Google GitHub actions: Setup Cloud SDK Client
Setup Cloud SDK for GitHub Actions API client for Node.js
A comprehensive list of changes in each version may be found in the CHANGELOG.
Table of contents:
This is not an officially supported Google product, and it is not covered by a Google Cloud support contract. To report bugs or request features in a Google Cloud product, please contact Google Cloud support.
Installing the client library
npm install @google-github-actions/setup-cloud-sdk
Using the client library
import * as core from '@actions/core';
import * as toolCache from '@actions/tool-cache';
import * as setupGcloud from '@google-github-actions/setup-cloud-sdk';
// Install gcloud if not already installed.
const gcloudVersion = await setupGcloud.getLatestGcloudSDKVersion();
if (!setupGcloud.isInstalled(gcloudVersion)) {
await setupGcloud.installGcloudSDK(gcloudVersion);
} else {
const toolPath = toolCache.find('gcloud', gcloudVersion);
core.addPath(path.join(toolPath, 'bin'));
}
// Authenticate gcloud SDK.
if (credentials) await setupGcloud.authenticateGcloudSDK(credentials);
const authenticated = await setupGcloud.isAuthenticated();
if (!authenticated) {
throw new Error('Error authenticating the Cloud SDK.');
}
const toolCommand = setupGcloud.getToolCommand();
Versioning
This library follows Semantic Versioning.
Contributing
Contributions welcome! See the Contributing Guide.
License
Apache Version 2.0
See LICENSE
1.1.8
11 months ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.5
1 year ago
1.1.4
1 year ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.5.2
3 years ago
0.5.1
3 years ago
0.5.0
3 years ago
0.4.0
3 years ago
0.3.0
4 years ago
0.3.1
4 years ago
0.2.0
4 years ago
0.1.1
4 years ago