Skip to content

feat: SSB-2967 - Implement setup-node action with safe-chain #2

feat: SSB-2967 - Implement setup-node action with safe-chain

feat: SSB-2967 - Implement setup-node action with safe-chain #2

name: Dependabot automation
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.STEP_GITHUB_ACTION_TOKEN }}
- name: Enable auto-merge for Dependabot PRs that doesn't include major version update
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.STEP_GITHUB_ACTION_TOKEN }}