Hello!
I have to run a Github action everytime a specific file is changed in a PR, the action will edit a related file and make a new commit. This works great and was super easy using https://github.com/EndBug/add-and-commit.
I do not know if the issue lies in the add-and-commit action or something else, but when the generated commit is pushed to the branch of the PR, the other workflows are not triggered all the time, and sometimes it works great.
This is what my action looks like, and I would be very thankful for any hints on why it does not always trigger.
name: Update next
on:
pull_request:
paths:
- "Gemfile.lock"
jobs:
update:
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUNDLE_GEMFILE: Gemfile.next
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Gems Cache
id: gem-cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-2.5.8-Next-${{ hashFiles('Gemfile.next.lock') }}
restore-keys: |
${{ runner.os }}-gem-2.5.8
- name: Update Gemfile.next
run: |
bundle update --minor --conservative
- uses: EndBug/add-and-commit@v5
with:
add: Gemfile.next.lock