mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
ci: Change to get the ref once without need for additional checkout (no-changelog) (#14494)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
28
.github/workflows/e2e-reusable.yml
vendored
28
.github/workflows/e2e-reusable.yml
vendored
@@ -64,20 +64,22 @@ jobs:
|
|||||||
# "sha-5d3fe...35d3-time-1620841214"
|
# "sha-5d3fe...35d3-time-1620841214"
|
||||||
run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT
|
run: echo "value=sha-$GITHUB_SHA-time-$(date +"%s")" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Calculate Git Ref 🤔
|
||||||
|
id: calculate_ref
|
||||||
|
run: |
|
||||||
|
if [ -n "${{ inputs.pr_number }}" ]; then
|
||||||
|
echo "value=refs/pull/${{ inputs.pr_number }}/head" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "value=${{ inputs.branch }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
install:
|
install:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||||
needs: ['prepare']
|
needs: ['prepare']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.branch }}
|
ref: ${{ steps.calculate_ref.outputs.value }}
|
||||||
|
|
||||||
- name: Checkout PR
|
|
||||||
if: ${{ inputs.pr_number }}
|
|
||||||
run: |
|
|
||||||
git fetch origin pull/${{ inputs.pr_number }}/head
|
|
||||||
git checkout FETCH_HEAD
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
||||||
|
|
||||||
@@ -119,15 +121,9 @@ jobs:
|
|||||||
# running the same tests multiple times
|
# running the same tests multiple times
|
||||||
containers: ${{ fromJSON( inputs.spec == 'e2e/*' && inputs.containers || '[1]' ) }}
|
containers: ${{ fromJSON( inputs.spec == 'e2e/*' && inputs.containers || '[1]' ) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.branch }}
|
ref: ${{ steps.calculate_ref.outputs.value }}
|
||||||
|
|
||||||
- name: Checkout PR
|
|
||||||
if: ${{ inputs.pr_number }}
|
|
||||||
run: |
|
|
||||||
git fetch origin pull/${{ inputs.pr_number }}/head
|
|
||||||
git checkout FETCH_HEAD
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user