File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 CLOUD_ML_REGION :
1616 required : true
1717 description : GCP region for Vertex AI
18- GIT_ACCESS_TOKEN :
18+ ACTIONS_APP_PRIVATE_KEY :
1919 required : false
20- description : Token for accessing private Git repositories in the same org
20+ description : Private key for the GitHub App used to access private repositories
2121
2222jobs :
2323 dependency-review :
@@ -35,13 +35,21 @@ jobs:
3535 ref : ${{ github.event.pull_request.head.sha }}
3636 fetch-depth : 1
3737
38+ - name : Generate token for private repositories
39+ if : secrets.ACTIONS_APP_PRIVATE_KEY != ''
40+ uses : actions/create-github-app-token@v1
41+ id : app-token
42+ with :
43+ app-id : ${{ vars.ACTIONS_APP_ID }}
44+ private-key : ${{ secrets.ACTIONS_APP_PRIVATE_KEY }}
45+ owner : ${{ github.repository_owner }}
46+
3847 - name : Configure git for private repositories
48+ if : steps.app-token.outputs.token != ''
3949 run : |
40- if [ -n "$GIT_ACCESS_TOKEN" ]; then
41- git config --global url."https://x-access-token:${GIT_ACCESS_TOKEN}@github.com/".insteadOf "https://github.com/"
42- fi
50+ git config --global url."https://x-access-token:${GIT_ACCESS_TOKEN}@github.com/".insteadOf "https://github.com/"
4351 env :
44- GIT_ACCESS_TOKEN : ${{ secrets.GIT_ACCESS_TOKEN }}
52+ GIT_ACCESS_TOKEN : ${{ steps.app-token.outputs.token }}
4553
4654 - name : Install dependencies
4755 id : install-deps
You can’t perform that action at this time.
0 commit comments