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 012d0b5 commit 4aba3be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/rails-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ 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
Expand Down

0 comments on commit 4aba3be

Please sign in to comment.