Skip to content

Fix ci for PR vs push#1827

Merged
dguittet merged 5 commits intopatchfrom
patch_ci
Aug 15, 2024
Merged

Fix ci for PR vs push#1827
dguittet merged 5 commits intopatchfrom
patch_ci

Conversation

@dguittet
Copy link
Collaborator

  • Want to match up the SSC branch of the same name, if that exists
  • for Push, there's no destination branch, so the default branch needs to be stated explicitly in ci.yml
  • for PR, there's a destination branch, so use that as the default branch

@dguittet dguittet requested a review from brtietz July 31, 2024 20:59

- name: Get branch name for push
if: ${{ github.event_name == 'push' }}
echo "GIT_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
Copy link
Collaborator

Choose a reason for hiding this comment

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

This did not have the intended effect.

image

SSC won't have an 1827/merge ref, so this will always default to patch. I think this does return the correct value for a push, but not a pull_request.

Is the right move to override with github.head_ref in the if block below?

@dguittet dguittet mentioned this pull request Aug 15, 2024
1 task
@brtietz brtietz self-requested a review August 15, 2024 19:11
Copy link
Collaborator

@brtietz brtietz left a comment

Choose a reason for hiding this comment

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

Latest version looks good, thank you!

@dguittet dguittet merged commit 5d6527e into patch Aug 15, 2024
@dguittet dguittet deleted the patch_ci branch August 15, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants