Skip to content

Commit 638c1d8

Browse files
committed
Use secure-checkout action
1 parent 8a19233 commit 638c1d8

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ on:
99
required: true
1010
type: "string"
1111

12-
env:
13-
# TODO: Adding the mongodb-dbx-release-automation app to the repository will allow fetching a one-time token and pushing
14-
# changes on behalf of the app. This also allows bypassing branch protection rules
15-
GIT_AUTHOR_NAME: "mongodb-dbx-release-bot[bot]"
16-
GIT_AUTHOR_EMAIL: "167856002+mongodb-dbx-release-bot[bot]@users.noreply.github.com"
17-
1812
jobs:
1913
prepare-release:
2014
environment: release
@@ -27,23 +21,13 @@ jobs:
2721
contents: write
2822

2923
steps:
30-
- uses: actions/create-github-app-token@v1
31-
id: app-token
32-
with:
33-
app-id: ${{ vars.APP_ID }}
34-
private-key: ${{ secrets.APP_PRIVATE_KEY }}
35-
36-
- name: "Store GitHub token in environment"
37-
run: echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
38-
3924
- name: "Create release output"
4025
run: echo '🎬 Release process for version ${{ env.RELEASE_VERSION }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY
4126

42-
- uses: actions/checkout@v4
27+
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v2
4328
with:
44-
# fetch-depth 0 is required to fetch all branches and tags
45-
fetch-depth: 0
46-
token: ${{ steps.app-token.outputs.token }}
29+
app-id: ${{ vars.APP_ID }}
30+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
4731

4832
- name: "Store version numbers in env variables"
4933
# The awk command to increase the version number was copied from

0 commit comments

Comments
 (0)