Skip to content
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: 2 additions & 5 deletions github-actions/bazel/configure-remote/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ inputs:
Windows is only configured to leverage remote caching.
google_credential:
description: |
A Google credential to be used as authentication for RBE API usages
trusted_build:
default: false
description: |
Whether the environment should be considerd a trusted build.
A Google credential to be used as authentication for RBE API usages, implies
the RBE interaction should be done as part of a trusted build.

runs:
using: 'node24'
Expand Down
29 changes: 15 additions & 14 deletions github-actions/bazel/configure-remote/configure-remote.js

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions github-actions/bazel/configure-remote/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@
// @ts-ignore-next-line strict-deps
import tokenRaw from './gcp_token.data';
import {k, iv, alg, at} from './constants.js';
import {createDecipheriv} from 'crypto';
import path from 'path';
import fs from 'fs';
import os from 'os';
import {createDecipheriv} from 'node:crypto';
import path from 'node:path';
import fs from 'node:fs';
import os from 'node:os';
import {exportVariable, getBooleanInput, getInput} from '@actions/core';

async function main() {
const isWindows = os.platform() === 'win32';
const bazelRcPath = getInput('bazelrc', {required: false, trimWhitespace: true});
const allowWindowsRbe = getBooleanInput('allow_windows_rbe', {required: true});
const trustedBuild = getBooleanInput('trusted_build', {required: false});
const credential =
getInput('google_credential', {required: false, trimWhitespace: true}) ||
getEmbeddedCredential();
const googleCredential = getInput('google_credential', {required: false, trimWhitespace: true});
const trustedBuild = !!googleCredential;
const credential = googleCredential || getEmbeddedCredential();

const destPath = isWindows
? path.join(process.env.APPDATA!, 'gcloud/application_default_credentials.json')
Expand Down
Loading