Skip to content

Commit

Permalink
Ensure we start from main even if workflow run from a branch
Browse files Browse the repository at this point in the history
I kept having problems while testing #7324
until I realized that because I was doing my testing on a branch,
`actions/checkout` was starting from the branch and then opening a PR
against `main`, so it included not only the commit generated within this
workflow, but also whatever other commits I'd made during my testing.

For this particular workflow, we always want to start from `main` as
we're building a PR that should only contain the version bump commit.
  • Loading branch information
jeffwidman committed May 17, 2023
1 parent 7e98127 commit d7cbc8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/gems-bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Ensure we start from main in case the workflow is run from a branch
ref: "main"

- uses: ruby/setup-ruby@v1 # bump-version.rb needs bundler
with:
# Use the version of bundler specified in `updater/Gemfile.lock`.
Expand Down

0 comments on commit d7cbc8b

Please sign in to comment.