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 d47966d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/update-dist.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Dependabot PR
on:
pull_request:
types: [opened, synchronize, edited, reopened]
types: [opened, reopened, synchronize]
branches:
- dependabot/**
- dependabot/**/**

jobs:
update-dist:
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 +37,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 +46,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 +65,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 d47966d

Please sign in to comment.