Skip to content

Commit 9cda3f1

Browse files
committed
build: migrate github-actions to new toolchain
1 parent e775d75 commit 9cda3f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+72220
-109083
lines changed

.aspect/rules/external_repository_action_cache/npm_translate_lock_LTkzNjczMzk3Mw==

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,20 @@
77
.npmrc=-1406867100
88
bazel/package.json=1905073619
99
bazel/spec-bundling/test/package.json=-1269314228
10+
github-actions/bazel/configure-remote/package.json=855472374
11+
github-actions/branch-manager/package.json=556340955
12+
github-actions/browserstack/package.json=855472374
13+
github-actions/feature-request/package.json=432234341
14+
github-actions/google-internal-tests/package.json=-197755049
15+
github-actions/org-file-sync/package.json=-768792564
16+
github-actions/post-approval-changes/package.json=-358252879
17+
github-actions/previews/pack-and-upload-artifact/package.json=974988309
18+
github-actions/previews/upload-artifacts-to-firebase/package.json=-2021238010
19+
github-actions/pull-request-labeling/package.json=-197755049
20+
github-actions/saucelabs/package.json=855472374
21+
github-actions/unified-status-check/package.json=-337882335
1022
ng-dev/package.json=1623281880
1123
package.json=-2034275404
12-
pnpm-lock.yaml=-1555064997
13-
pnpm-workspace.yaml=-1504318433
24+
pnpm-lock.yaml=1833567439
25+
pnpm-workspace.yaml=1110472849
1426
yarn.lock=1126032185

.prettierignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.github/local-actions/labels-sync/main.js
44
.github/local-actions/lock-closed/main.js
5-
github-actions/bazel/configure-remote/configure-remote.cjs
5+
github-actions/bazel/configure-remote/configure-remote.js
66
github-actions/branch-manager/main.js
7-
github-actions/browserstack/set-browserstack-env.cjs
7+
github-actions/browserstack/set-browserstack-env.js
88
github-actions/pull-request-labeling/main.js
99
github-actions/feature-request/main.js
1010
github-actions/google-internal-tests/main.js
@@ -13,7 +13,7 @@ github-actions/post-approval-changes/main.js
1313
github-actions/previews/pack-and-upload-artifact/inject-artifact-metadata.js
1414
github-actions/previews/upload-artifacts-to-firebase/extract-artifact-metadata.js
1515
github-actions/previews/upload-artifacts-to-firebase/fetch-workflow-artifact.js
16-
github-actions/saucelabs/set-saucelabs-env.cjs
16+
github-actions/saucelabs/set-saucelabs-env.js
1717
github-actions/slash-commands/main.js
1818
github-actions/unified-status-check/main.js
1919

bazel/setup_dependencies_1.bzl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ def setup_dependencies_1():
99
"@devinfra//.github/local-actions/branch-manager:package.json",
1010
"@devinfra//.github/local-actions/labels-sync:package.json",
1111
"@devinfra//.github/local-actions/lock-closed:package.json",
12+
"@devinfra//github-actions/google-internal-tests:package.json",
13+
"@devinfra//github-actions/pull-request-labeling:package.json",
14+
"@devinfra//github-actions/unified-status-check:package.json",
15+
"@devinfra//github-actions/previews/pack-and-upload-artifact:package.json",
16+
"@devinfra//github-actions/previews/upload-artifacts-to-firebase:package.json",
17+
"@devinfra//github-actions/post-approval-changes:package.json",
18+
"@devinfra//github-actions/branch-manager:package.json",
19+
"@devinfra//github-actions/saucelabs:package.json",
20+
"@devinfra//github-actions/browserstack:package.json",
21+
"@devinfra//github-actions/bazel/configure-remote:package.json",
22+
"@devinfra//github-actions/org-file-sync:package.json",
23+
"@devinfra//github-actions/feature-request:package.json",
1224
"@devinfra//ng-dev:package.json",
1325
"@devinfra//bazel/spec-bundling/test:package.json",
1426
"@devinfra//:pnpm-workspace.yaml",

github-actions/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ts_config(
66
name = "tsconfig",
77
src = "tsconfig.json",
88
deps = [
9+
"//:node_modules/@types/node",
910
"//:rjs-tsconfig",
1011
],
1112
)
@@ -15,6 +16,7 @@ ts_config(
1516
src = "tsconfig-test.json",
1617
deps = [
1718
":tsconfig",
19+
"//:node_modules/@types/jasmine",
1820
],
1921
)
2022

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,41 @@
1-
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "generated_file_test", "nodejs_binary")
2-
load("//tools:defaults.bzl", "esbuild", "ts_library")
3-
load("//tools/node-to-shell-script:index.bzl", "nodejs_script_to_sh_script")
1+
load("@devinfra_npm//:defs.bzl", "npm_link_all_packages")
2+
load("//tools:defaults2.bzl", "copy_to_bin", "esbuild_checked_in", "js_binary", "ts_project")
3+
4+
npm_link_all_packages()
45

56
copy_to_bin(
67
name = "gcp_token",
78
srcs = ["gcp_token.data"],
89
)
910

10-
ts_library(
11+
ts_project(
1112
name = "setup-bazel-remote-exec",
1213
srcs = glob(["*.ts"]),
13-
# TODO(devversion): Remove this when `ts_library` supports `.mts` extension.
14-
devmode_module = "commonjs",
14+
tsconfig = "//github-actions:tsconfig",
1515
deps = [
16-
"@npm//@actions/core",
17-
"@npm//@types/node",
16+
":node_modules/@actions/core",
17+
":node_modules/@types/node",
1818
],
1919
)
2020

21-
nodejs_binary(
21+
js_binary(
2222
name = "encrypt",
23-
data = [":setup-bazel-remote-exec"],
24-
entry_point = ":encrypt.ts",
23+
data = [":setup-bazel-remote-exec_rjs"],
24+
entry_point = ":encrypt.js",
2525
)
2626

27-
esbuild(
28-
name = "bundle",
29-
srcs = [":gcp_token"],
30-
args = {
27+
esbuild_checked_in(
28+
name = "configure-remote",
29+
srcs = [
30+
":gcp_token",
31+
":setup-bazel-remote-exec_rjs",
32+
],
33+
config = {
3134
"loader": {
3235
".data": "binary",
3336
},
3437
},
3538
entry_point = "index.ts",
3639
format = "iife",
37-
minify = True,
38-
sourcemap = "",
39-
deps = [":setup-bazel-remote-exec"],
40-
)
41-
42-
# TODO: determine if we can use the node script directly in github actions
43-
nodejs_script_to_sh_script(
44-
name = "script",
45-
bundle_file = ":bundle.js",
46-
output_file = "script.sh",
47-
)
48-
49-
generated_file_test(
50-
name = "configure-remote",
51-
src = "configure-remote.cjs",
52-
generated = ":bundle.js",
40+
platform = "node",
5341
)

github-actions/bazel/configure-remote/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ inputs:
2222
2323
runs:
2424
using: 'node20'
25-
main: 'configure-remote.cjs'
25+
main: 'configure-remote.js'

github-actions/bazel/configure-remote/configure-remote.cjs

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)