Skip to content

Update dependabot branch #8

Update dependabot branch

Update dependabot branch #8

name: Update dependabot branch
on:
pull_request:
branches: [master]
workflow_dispatch:
jobs:
update_branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: make empty commit to dependabot branch
id: empty_dependabot
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
pr_number=$(gh pr list -S 'author:app/dependabot' --json number -q '.[0].number')
branch_name=$(gh pr view $pr_number --json headRefName -q '.headRefName')
git fetch
git checkout $branch_name
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git commit --allow-empty -m "Empty commit to force CI/CD"
git push origin $branch_name