Skip to content

Commit

Permalink
SMR-17: ensure correct ref is checked out and that buildx works
Browse files Browse the repository at this point in the history
  • Loading branch information
hallieswan committed Feb 20, 2025
1 parent 9374e24 commit 6ce4c30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/e2e-agora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ jobs:
# merge commit in this context. The current solution is to checkout the PR HEAD instead
# and enable the branch protection rule "Require branches to be up to date before
# merging".
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && github.event.pull_request.head.sha || github.ref }}

- name:
Switch from the detached HEAD of the merge commit to a new branch
# Buildx does not work on a detached HEAD
run: git switch -c new-branch

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
Expand Down

0 comments on commit 6ce4c30

Please sign in to comment.