Skip to content

Update dependabot branch #7

Update dependabot branch

Update dependabot branch #7

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 commit --allow-empty -m "Empty commit to force CI/CD"
git push origin $branch_name