豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 4abbb11

Browse files
committed
feat(github-actions): create org-file-sync action
Create an org-file-sync action which allows for automatically synchronizing organization level files from the `.github` directory with target repositories automatically. The angular-robot Github app will automatically push changes to keep the registered files in sync.
1 parent 73d4292 commit 4abbb11

File tree

6 files changed

+15795
-0
lines changed

6 files changed

+15795
-0
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ github-actions/lock-closed/main.js
88
github-actions/commit-message-based-labels/main.js
99
github-actions/slash-commands/main.js
1010
github-actions/post-approval-changes/main.js
11+
github-actions/org-file-sync/main.js
1112
.github/local-actions/changelog/main.js
1213

1314
bazel/map-size-tracking/test/size-golden.json
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
load("//tools:defaults.bzl", "esbuild_checked_in", "ts_library")
2+
3+
package(default_visibility = ["//github-actions/org-file-sync:__subpackages__"])
4+
5+
ts_library(
6+
name = "org-file-sync",
7+
srcs = glob(
8+
["src/*.ts"],
9+
),
10+
deps = [
11+
"//github-actions:utils",
12+
"@npm//@actions/core",
13+
"@npm//@actions/github",
14+
"@npm//@octokit/rest",
15+
"@npm//@octokit/types",
16+
"@npm//@types/node",
17+
],
18+
)
19+
20+
esbuild_checked_in(
21+
name = "main",
22+
entry_point = ":src/main.ts",
23+
target = "node16",
24+
deps = [
25+
":org-file-sync",
26+
],
27+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Organization File Sync
2+
3+
This directory contains an action which can be executed in the `.github` repository. Based on the
4+
configured list of files and repositories, the action will ensure the all of the provided files in
5+
the provided repositories are kept in sync with the `.github` repository.
6+
7+
## License
8+
9+
MIT
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Organization File Sync'
2+
description: 'Synchronize files throughout the Github Organization'
3+
author: 'Angular'
4+
inputs:
5+
angular-robot-key:
6+
description: 'The private key for the Angular Robot Github app.'
7+
required: true
8+
repos:
9+
description: 'The repositories to keep organization level files in sync'
10+
required: true
11+
files:
12+
description: 'The organization level files to keep in sync'
13+
required: true
14+
15+
runs:
16+
using: 'node16'
17+
main: 'main.js'

0 commit comments

Comments
 (0)