Skip to content

Commit

Permalink
Fix dependabot workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Oct 8, 2022
1 parent d26cdd1 commit b3f109a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/update-dist.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Dependabot PR
on:
pull_request:
types: [opened, synchronize, edited, reopened]
push:
branches:
- dependabot/**

Expand All @@ -10,7 +9,7 @@ jobs:
name: Update dist
runs-on: ubuntu-22.04
if: >
startsWith(github.head_ref, 'dependabot/npm_and_yarn') &&
startsWith(github.ref, 'refs/heads/dependabot/npm_and_yarn') &&
github.actor == 'dependabot[bot]'
permissions:
Expand All @@ -37,7 +36,7 @@ jobs:
run: yarn build

- name: Commit new dist
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v4.15.0
with:
file_pattern: dist
commit_message: Build dist
Expand All @@ -46,7 +45,7 @@ jobs:
name: Update dist
runs-on: ubuntu-22.04
if: >
startsWith(github.head_ref, 'dependabot/npm_and_yarn') &&
startsWith(github.ref, 'refs/heads/dependabot/npm_and_yarn') &&
github.actor == 'dependabot[bot]'
needs: [update-dist]
Expand All @@ -65,7 +64,7 @@ jobs:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve a PR
if: ${{ steps.dependabot-metadata.outputs.update-type == "version-update:semver-patch" }}
if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' }}
run: |
gh pr checkout "$PR_URL"
[ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ] \
Expand Down

0 comments on commit b3f109a

Please sign in to comment.