File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,10 +33,30 @@ jobs:
3333 outputs :
3434 version : ${{ steps.pre-publish.outputs.version }}
3535 steps :
36- - uses : mongodb-labs/drivers-github-tools/secure-checkout@v3
36+ - name : Create app token
37+ id : app-token
38+ uses : actions/create-github-app-token@v3
3739 with :
38- app_id : ${{ vars.APP_ID }}
39- private_key : ${{ secrets.APP_PRIVATE_KEY }}
40+ app-id : ${{ vars.APP_ID }}
41+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
42+ permission-contents : write
43+ permission-pull-requests : write
44+ permission-workflows : write
45+ - name : Store token
46+ shell : bash -eu {0}
47+ # zizmor: ignore[template-injection] GH_TOKEN is a GitHub App installation token, not attacker-controllable
48+ run : echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
49+ - uses : actions/checkout@v7.0.1
50+ with :
51+ ref : ${{ github.ref }}
52+ token : ${{ env.GH_TOKEN }}
53+ fetch-depth : 1
54+ persist-credentials : false
55+ - name : Configure git auth for push
56+ shell : bash -eu {0}
57+ run : |
58+ auth_header=$(printf 'x-access-token:%s' "${GH_TOKEN}" | base64 -w0)
59+ git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${auth_header}"
4060 - uses : mongodb-labs/drivers-github-tools/setup@v3
4161 with :
4262 aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
You can’t perform that action at this time.
0 commit comments