fix(ci): post-runner-image cleanup #7
@@ -27,8 +27,11 @@ jobs:
|
||||
- name: Derive Nx affected base and head
|
||||
shell: bash
|
||||
run: |
|
||||
# `actions/checkout@v4` with fetch-depth: 0 already pulls every
|
||||
# branch and tag, so origin/<base_ref> is present locally — no
|
||||
# extra `git fetch` is needed (and `--depth=0` is invalid: git
|
||||
# requires a positive integer).
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
git fetch origin "${{ github.base_ref }}" --depth=0
|
||||
echo "NX_BASE=$(git merge-base HEAD origin/${{ github.base_ref }})" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "NX_BASE=HEAD~1" >> "$GITHUB_ENV"
|
||||
|
||||
Reference in New Issue
Block a user