Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWC-6514: use the short ref name of the branch, rather than the full ref #5163

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: 'Build/Run End-to-End Tests'
on: push
jobs:
build-and-run-e2e:
if: ${{ github.ref == 'develop' || github.ref == 'release-**' || github.actor == github.repository_owner }}
Copy link
Contributor Author

@hallieswan hallieswan Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per GitHub docs:

github.ref is "The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by push, this is the branch or tag ref that was pushed...The ref given is fully-formed, meaning that for branches the format is refs/heads/<branch_name>, for pull requests it is refs/pull/<pr_number>/merge, and for tags it is refs/tags/<tag_name>. For example, refs/heads/feature-branch-1."

github.ref_name is "The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1."

Use github.ref_name so the conditional evaluates the correct values.

if: ${{ github.ref_name == 'develop' || github.ref_name == 'release-**' || github.actor == github.repository_owner }}
runs-on: macos-latest
env:
CONTAINER_NAME: 'swc-tomcat'
Expand Down