fix(ci): correct Yarn 4 cache paths and add auto-merge for version PRs
fix(ci): correct Yarn 4 cache paths and add auto-merge for version PRs
This commit is contained in:
@@ -35,10 +35,12 @@ jobs:
|
|||||||
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
||||||
|
|
||||||
- name: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: |
|
||||||
|
node_modules
|
||||||
|
.yarn/install-state.gz
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|||||||
@@ -35,10 +35,12 @@ jobs:
|
|||||||
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
||||||
|
|
||||||
- name: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: |
|
||||||
|
node_modules
|
||||||
|
.yarn/install-state.gz
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|||||||
@@ -44,10 +44,12 @@ jobs:
|
|||||||
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
||||||
|
|
||||||
- name: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: |
|
||||||
|
node_modules
|
||||||
|
.yarn/install-state.gz
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|||||||
@@ -43,10 +43,12 @@ jobs:
|
|||||||
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
||||||
|
|
||||||
- name: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: |
|
||||||
|
node_modules
|
||||||
|
.yarn/install-state.gz
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|||||||
@@ -36,10 +36,12 @@ jobs:
|
|||||||
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
|
||||||
|
|
||||||
- name: Restore Yarn Cache
|
- name: Restore Yarn Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: |
|
||||||
|
node_modules
|
||||||
|
.yarn/install-state.gz
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|||||||
@@ -48,7 +48,9 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: |
|
||||||
|
node_modules
|
||||||
|
.yarn/install-state.gz
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
@@ -143,11 +145,24 @@ jobs:
|
|||||||
> **Note:** This PR was created with force mode enabled."
|
> **Note:** This PR was created with force mode enabled."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gh pr create \
|
# Create PR
|
||||||
|
PR_URL=$(gh pr create \
|
||||||
--title "chore: update WhatsApp Web version" \
|
--title "chore: update WhatsApp Web version" \
|
||||||
--body "$PR_BODY" \
|
--body "$PR_BODY" \
|
||||||
--base master \
|
--base master \
|
||||||
--head "$BRANCH_NAME" || echo "PR already exists or could not be created"
|
--head "$BRANCH_NAME" 2>&1) || true
|
||||||
|
|
||||||
|
if [[ "$PR_URL" == *"github.com"* ]]; then
|
||||||
|
echo "PR created: $PR_URL"
|
||||||
|
|
||||||
|
# Auto-merge the PR (squash merge)
|
||||||
|
echo "Attempting to auto-merge..."
|
||||||
|
gh pr merge "$BRANCH_NAME" --squash --auto --delete-branch || \
|
||||||
|
gh pr merge "$BRANCH_NAME" --squash --delete-branch || \
|
||||||
|
echo "Auto-merge not available - PR created for manual review"
|
||||||
|
else
|
||||||
|
echo "PR already exists or could not be created: $PR_URL"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user