ci: checkout PR [skip ci]

This commit is contained in:
Baptiste Augrain 2023-12-17 18:13:34 +01:00
parent 0d7ded33f3
commit 0952b2f0dc
2 changed files with 12 additions and 21 deletions

View File

@ -47,15 +47,9 @@ jobs:
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Checkout PR
env:
PR_ID: ${{ github.event.inputs.checkout_pr }}
run: |
git fetch origin pull/$PR_ID/head
git checkout FETCH_HEAD
if: github.event.inputs.checkout_pr != ''
- name: Clone VSCode repo
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_repo.sh
- name: Check PR or cron
@ -88,13 +82,9 @@ jobs:
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Checkout PR
uses: dawidd6/action-checkout-pr@v1
with:
pr: ${{ github.event.inputs.checkout_pr }}
if: github.event.inputs.checkout_pr != ''
- name: Clone VSCode repo
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_repo.sh
- uses: docker/setup-qemu-action@v3
@ -153,13 +143,9 @@ jobs:
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Checkout PR
uses: dawidd6/action-checkout-pr@v1
with:
pr: ${{ github.event.inputs.checkout_pr }}
if: github.event.inputs.checkout_pr != ''
- name: Clone VSCode repo
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_repo.sh
- name: Install GH
@ -194,7 +180,7 @@ jobs:
name: assets
path: ./assets/
retention-days: 3
if: github.event.inputs.generate_assets == 'true'
if: env.SHOULD_BUILD == 'yes' && github.event.inputs.generate_assets == 'true'
- name: Release
env:

View File

@ -8,6 +8,11 @@ if [[ "${CI_BUILD}" != "no" ]]; then
git config --global --add safe.directory "/__w/$( echo "${GITHUB_REPOSITORY}" | awk '{print tolower($0)}' )"
fi
if [[ -n "${PULL_REQUEST_ID}" ]]; then
git fetch origin "pull/${PULL_REQUEST_ID}/head"
git checkout FETCH_HEAD
fi
if [[ -z "${RELEASE_VERSION}" ]]; then
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "${VSCODE_QUALITY}.json" ]]; then
UPDATE_INFO=$( curl --silent --fail "https://update.code.visualstudio.com/api/update/darwin/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" )