-
Notifications
You must be signed in to change notification settings - Fork 1.2k
PYTHON-6076 Request workflows permission in create-release-branch #3039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,10 +33,30 @@ jobs: | |
| outputs: | ||
| version: ${{ steps.pre-publish.outputs.version }} | ||
| steps: | ||
| - uses: mongodb-labs/drivers-github-tools/secure-checkout@v3 | ||
| - name: Create app token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v3 | ||
| with: | ||
| app_id: ${{ vars.APP_ID }} | ||
| private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
| app-id: ${{ vars.APP_ID }} | ||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
| permission-contents: write | ||
| permission-pull-requests: write | ||
| permission-workflows: write | ||
| - name: Store token | ||
| shell: bash -eu {0} | ||
| # zizmor: ignore[template-injection] GH_TOKEN is a GitHub App installation token, not attacker-controllable | ||
| run: echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV" | ||
| - uses: actions/checkout@v7.0.1 | ||
| with: | ||
| ref: ${{ github.ref }} | ||
| token: ${{ env.GH_TOKEN }} | ||
| fetch-depth: 1 | ||
| persist-credentials: false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can drop
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want the auth stored on disk |
||
| - name: Configure git auth for push | ||
| shell: bash -eu {0} | ||
| run: | | ||
| auth_header=$(printf 'x-access-token:%s' "${GH_TOKEN}" | base64 -w0) | ||
| git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${auth_header}" | ||
| - uses: mongodb-labs/drivers-github-tools/setup@v3 | ||
| with: | ||
| aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.