mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-12 02:00:06 -06:00
merge develop
This commit is contained in:
12
.github/workflows/update_v8_snapshot_cache.yml
vendored
12
.github/workflows/update_v8_snapshot_cache.yml
vendored
@@ -118,11 +118,17 @@ jobs:
|
||||
echo "BRANCH_NAME=update-v8-snapshot-cache-on-${{ env.BASE_BRANCH }}-${{ env.PLATFORM }}" >> $GITHUB_ENV
|
||||
echo "BRANCH_EXISTS=$(git show-ref --verify --quiet refs/remotes/origin/update-v8-snapshot-cache-on-${{ env.BASE_BRANCH }}-${{ env.PLATFORM }} && echo 'true')" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
- name: Check number of existing prs
|
||||
id: check-number-of-existing-prs
|
||||
run: |
|
||||
echo "number_of_prs_for_branch=$(gh api '/repos/cypress-io/cypress/pulls?head=cypress-io:${{ env.BRANCH_NAME }}' --jq length)" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }}
|
||||
shell: bash
|
||||
- name: Check need for PR or branch update
|
||||
id: check-need-for-pr
|
||||
run: |
|
||||
echo "number_of_prs_for_branch=$(gh api '/repos/cypress-io/cypress/pulls?head=cypress-io:${{ env.BRANCH_NAME }}' --jq length)" >> $GITHUB_OUTPUT
|
||||
echo "needs_pr=${{ steps.check-for-v8-snapshot-cache-changes.outputs.has_changes == 'true' && env.BRANCH_NAME != env.BASE_BRANCH && steps.check-need-for-pr.outputs.number_of_prs_for_branch == '0' }}" >> $GITHUB_OUTPUT
|
||||
echo "needs_pr=${{ steps.check-for-v8-snapshot-cache-changes.outputs.has_changes == 'true' && env.BRANCH_NAME != env.BASE_BRANCH && steps.check-number-of-existing-prs.outputs.number_of_prs_for_branch == '0' }}" >> $GITHUB_OUTPUT
|
||||
echo "needs_branch_update=${{ steps.check-for-v8-snapshot-cache-changes.outputs.has_changes == 'true' && env.BRANCH_EXISTS == 'true' }}" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }}
|
||||
@@ -135,7 +141,7 @@ jobs:
|
||||
git reset --hard
|
||||
git checkout ${{ env.BRANCH_NAME }}
|
||||
git pull origin ${{ env.BRANCH_NAME }}
|
||||
git merge --squash -Xtheirs stash
|
||||
git merge -Xtheirs stash
|
||||
## Update available and a PR doesn't already exist
|
||||
- name: Checkout new branch
|
||||
if: ${{ steps.check-need-for-pr.outputs.needs_branch_update != 'true' }}
|
||||
|
||||
Reference in New Issue
Block a user