4949 outputs :
5050 matrix : ${{ steps.set-matrix.outputs.result }}
5151 steps :
52+ - name : Generate GitHub App token
53+ id : app-token
54+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
55+ with :
56+ app-id : ${{ secrets.DOCS_BOT_APP_ID }}
57+ private-key : ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
58+ owner : github
59+ repositories : docs-engineering
60+
5261 - uses : actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
5362 id : set-matrix
5463 with :
@@ -102,7 +111,7 @@ jobs:
102111 - uses : ./.github/actions/create-workflow-failure-issue
103112 if : ${{ failure() && github.event_name != 'workflow_dispatch' }}
104113 with :
105- token : ${{ secrets.DOCS_BOT_PAT_BASE }}
114+ token : ${{ steps.app-token.outputs.token }}
106115
107116 updateElasticsearchIndexes :
108117 needs : figureOutMatrix
@@ -126,20 +135,28 @@ jobs:
126135 steps :
127136 - name : Check out repo
128137 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
138+ - name : Generate GitHub App token
139+ id : app-token
140+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
141+ with :
142+ app-id : ${{ secrets.DOCS_BOT_APP_ID }}
143+ private-key : ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
144+ owner : github
145+ repositories : docs-internal-data,docs-internal.es-es,docs-internal.ja-jp,docs-internal.pt-br,docs-internal.zh-cn,docs-internal.ru-ru,docs-internal.fr-fr,docs-internal.ko-kr,docs-internal.de-de,docs-engineering
129146
130147 - name : Clone docs-internal-data
131148 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
132149 with :
133150 repository : github/docs-internal-data
134151 # This works because user `docs-bot` has read access to that private repo.
135- token : ${{ secrets.DOCS_BOT_PAT_BASE }}
152+ token : ${{ steps.app-token.outputs.token }}
136153 path : docs-internal-data
137154
138155 - name : Clone all translations
139156 if : ${{ matrix.language != 'en' }}
140157 uses : ./.github/actions/clone-translations
141158 with :
142- token : ${{ secrets.DOCS_BOT_PAT_BASE }}
159+ token : ${{ steps.app-token.outputs.token }}
143160
144161 - uses : ./.github/actions/node-npm-setup
145162
@@ -249,7 +266,7 @@ jobs:
249266 - uses : ./.github/actions/create-workflow-failure-issue
250267 if : ${{ failure() && github.event_name != 'workflow_dispatch' }}
251268 with :
252- token : ${{ secrets.DOCS_BOT_PAT_BASE }}
269+ token : ${{ steps.app-token.outputs.token }}
253270
254271 notifyScrapingFailures :
255272 name : Notify scraping failures
@@ -259,6 +276,14 @@ jobs:
259276 steps :
260277 - name : Check out repo
261278 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
279+ - name : Generate GitHub App token
280+ id : app-token
281+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
282+ with :
283+ app-id : ${{ secrets.DOCS_BOT_APP_ID }}
284+ private-key : ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
285+ owner : github
286+ repositories : docs-engineering
262287
263288 - name : Download all failure artifacts
264289 uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
@@ -294,7 +319,7 @@ jobs:
294319 - name : Comment on or create scraping failure issue
295320 if : ${{ steps.check-artifacts.outputs.has_artifacts == 'true' && fromJSON(steps.aggregate.outputs.result || '{"hasFailures":false}').hasFailures }}
296321 env :
297- GH_TOKEN : ${{ secrets.DOCS_BOT_PAT_BASE }}
322+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
298323 FAILURE_MESSAGE : ${{ fromJSON(steps.aggregate.outputs.result || '{"message":""}').message }}
299324 RUN_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
300325 FILE_URL : ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/index-general-search.yml
@@ -393,4 +418,4 @@ jobs:
393418 - uses : ./.github/actions/create-workflow-failure-issue
394419 if : ${{ failure() }}
395420 with :
396- token : ${{ secrets.DOCS_BOT_PAT_BASE }}
421+ token : ${{ steps.app-token.outputs.token }}
0 commit comments