Skip to content

Commit

Permalink
fix: dependabot creates multiple changesets (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Jul 5, 2024
1 parent f18a570 commit 2f1a650
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pr-validate-changesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,37 @@ jobs:
# see https://github.com/changesets/action/issues/70
persist-credentials: false

- name: Get PR's changeset file
run: |
echo "CHANGESET_FILE=$(git diff --diff-filter=A --name-only origin/${{ github.base_ref }} .changeset/*.md)" >> $GITHUB_ENV
- name: Setup PNPM
if: env.CHANGESET_FILE == ''
uses: pnpm/action-setup@v4
with:
version: 9.4.0
run_install: true

- name: Install jq
if: env.CHANGESET_FILE == ''
run: sudo apt-get install -y jq

- name: Run dependabot changeset script
if: env.CHANGESET_FILE == ''
run: pnpm changeset:dependabot
env:
PR_TITLE: ${{ github.event.pull_request.title }}

- name: Set up .netrc file
if: env.CHANGESET_FILE == ''
run: |
echo "machine github.com" > $HOME/.netrc
echo "login github-actions[bot]" >> $HOME/.netrc
echo "password ${{ secrets.REPO_TOKEN }}" >> $HOME/.netrc
chmod 600 $HOME/.netrc
- name: Commit Changeset
if: env.CHANGESET_FILE == ''
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
Expand Down

0 comments on commit 2f1a650

Please sign in to comment.