Skip to content
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

chore(ci): more fixes for the rebuild changelog action VSCODE-676 #933

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/rebuild-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
name: Rebuild changelog
runs-on: ubuntu-latest
steps:
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
github-advanced-security[bot] marked this conversation as resolved.
Dismissed
Show resolved Hide resolved
id: app-token
with:
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
# don't checkout a detached HEAD, is important to have a real base
Expand All @@ -30,13 +36,11 @@
# this is important so git log can pick up on
# the whole history to generate the CHANGELOG
fetch-depth: '0'
token: ${{ steps.app-token.outputs.token }}

- name: Update CHANGELOG.md
# List all the releases and rebuild
# the changelog with the last 30
# releases
# Use the `--limit` parameter in `gh release list`
# to tweak this number
# the changelog.
run: |
echo "# Change Log" > CHANGELOG.md
echo "" >> CHANGELOG.md
Expand Down Expand Up @@ -64,7 +68,7 @@
echo "" >> CHANGELOG.md
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Create Pull Request
id: cpr
Expand All @@ -78,11 +82,10 @@
CHANGELOG.md
body: |
- Update `CHANGELOG.md`
token: ${{ steps.app-token.outputs.token }}

- name: Merge PR
env:
PULL_REQUEST_NUMBER: ${{steps.cpr.outputs.pull-request-number}}
# NOTE: we don't use a PAT so to not trigger further automation
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
gh pr merge $PULL_REQUEST_NUMBER --squash --delete-branch
gh pr merge ${{steps.cpr.outputs.pull-request-number}} --squash --delete-branch
Loading