Skip to content

Commit

Permalink
Change how we specify the gem branch
Browse files Browse the repository at this point in the history
We install the gem to run our integration tests. They recently started
to fail and the issues seemed to be that bundler couldn't locate the
branch.

The branch name is supplied by `github.ref` switching to the logic here
seems to have fixed this.

`head_ref` for PRs with a fall back to `ref_name` if it is not a PR.

Documentation:

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
  • Loading branch information
mec committed Dec 13, 2024
1 parent db1c6c2 commit 2e6b2b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/rails-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
file: ./Dockerfile
build-args: |
RAILS_VERSION=${{ matrix.rails }}
MAIL_NOTIFY_BRANCH=${{ github.ref }}
MAIL_NOTIFY_BRANCH=${{ github.head_ref || github.ref_name }}
RUBY_VERSION=3.2.6
push: false
tags: mail-notify-integration-rails-${{ matrix.rails }}:latest
outputs: type=docker, dest=/tmp/rails-${{ matrix.rails }}-image.tar
Expand Down

0 comments on commit 2e6b2b4

Please sign in to comment.