@@ -52,11 +52,89 @@ jobs:
52
52
run-id : ${{ github.event.workflow_run.id }}
53
53
github-token : ${{ secrets.GITHUB_TOKEN }}
54
54
55
+ # GitHub tokens generated from GitHub Apps can access resources from one organization,
56
+ # so we need to generate a token for each organization.
57
+ - name : Generate GitHub token (rust-lang)
58
+ uses : actions/create-github-app-token@v1
59
+ id : rust-lang-token
60
+ with :
61
+ # GitHub App ID secret name
62
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
63
+ # GitHub App private key secret name
64
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
65
+ # Set the owner, so the token can be used in all repositories
66
+ owner : rust-lang
67
+
68
+ - name : Generate GitHub token (rust-lang-ci)
69
+ uses : actions/create-github-app-token@v1
70
+ id : rust-lang-ci-token
71
+ with :
72
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
73
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
74
+ owner : rust-lang-ci
75
+
76
+ - name : Generate GitHub token (rust-lang-deprecated)
77
+ uses : actions/create-github-app-token@v1
78
+ id : rust-lang-deprecated-token
79
+ with :
80
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
81
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
82
+ owner : rust-lang-deprecated
83
+
84
+ - name : Generate GitHub token (rust-lang-nursery)
85
+ uses : actions/create-github-app-token@v1
86
+ id : rust-lang-nursery-token
87
+ with :
88
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
89
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
90
+ owner : rust-lang-nursery
91
+
92
+ - name : Generate GitHub token (bors-rs)
93
+ uses : actions/create-github-app-token@v1
94
+ id : bors-rs-token
95
+ with :
96
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
97
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
98
+ owner : bors-rs
99
+
100
+ - name : Generate GitHub token (rust-analyzer)
101
+ uses : actions/create-github-app-token@v1
102
+ id : rust-analyzer-token
103
+ with :
104
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
105
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
106
+ owner : rust-analyzer
107
+
108
+ - name : Generate GitHub token (rust-embedded)
109
+ uses : actions/create-github-app-token@v1
110
+ id : rust-embedded-token
111
+ with :
112
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
113
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
114
+ owner : rust-embedded
115
+
116
+ - name : Generate GitHub token (rust-dev-tools)
117
+ uses : actions/create-github-app-token@v1
118
+ id : rust-dev-tools-token
119
+ with :
120
+ app-id : ${{ secrets.SYNC_TEAM_GH_APP_ID }}
121
+ private-key : ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }}
122
+ owner : rust-dev-tools
123
+
55
124
- name : Run sync-team dry-run check
125
+ env :
126
+ GITHUB_TOKEN_RUST_LANG : ${{ steps.rust-lang-token.outputs.token }}
127
+ GITHUB_TOKEN_RUST_LANG_CI : ${{ steps.rust-lang-ci-token.outputs.token }}
128
+ GITHUB_TOKEN_RUST_LANG_DEPRECATED : ${{ steps.rust-lang-deprecated-token.outputs.token }}
129
+ GITHUB_TOKEN_RUST_LANG_NURSERY : ${{ steps.rust-lang-nursery-token.outputs.token }}
130
+ GITHUB_TOKEN_BORS_RS : ${{ steps.bors-rs-token.outputs.token }}
131
+ GITHUB_TOKEN_RUST_ANALYZER : ${{ steps.rust-analyzer-token.outputs.token }}
132
+ GITHUB_TOKEN_RUST_EMBEDDED : ${{ steps.rust-embedded-token.outputs.token }}
133
+ GITHUB_TOKEN_RUST_DEV_TOOLS : ${{ steps.rust-dev-tools-token.outputs.token }}
56
134
run : |
57
135
# Perform build and execution separately to avoid any potential output from
58
136
# cargo leaking into the output file.
59
- cargo build ./target/debug/sync-team print-plan --team-json team-api > output.txt
137
+ cargo build ./target/debug/sync-team print-plan --services github -- team-json team-api > output.txt
60
138
61
139
- name : Prepare comment
62
140
run : |
0 commit comments