Skip to content

fix(ci): skip PR tarball publish on non-PR workflow runs #3

fix(ci): skip PR tarball publish on non-PR workflow runs

fix(ci): skip PR tarball publish on non-PR workflow runs #3

name: Dependabot Auto-Merge (Minor/Patch)
on:
pull_request_target:
types: [opened, synchronize]
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-approve and merge minor/patch github-actions updates
if: >-
steps.metadata.outputs.package-ecosystem == 'github_actions' && (steps.metadata.outputs.update-type ==
'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'version-update:semver-patch')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr review "$PR_URL" --approve
gh pr merge "$PR_URL" --auto --merge