Skip to content

Commit

Permalink
Update update-preview-deps.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Oct 23, 2024
1 parent 99dd721 commit 5d12a16
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/update-preview-deps.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Update Preview Dependencies (feat/v2)"
name: "Update Preview Dependencies (master)"
on:
workflow_dispatch:

Expand All @@ -13,8 +13,6 @@ jobs:

- name: Checkout
uses: actions/[email protected]
with:
ref: 'feat/v2'

- name: Setup Node.js 20
uses: actions/setup-node@v3
Expand All @@ -31,7 +29,7 @@ jobs:
shell: "bash"
run: |
PR_LIST=$(gh pr list --base feat/v2 --json number,headRefName)
PR_LIST=$(gh pr list --base master --json number,headRefName)
# Filter out PRs where headRefName starts with 'chore/update-preview'
FILTERED_PR_LIST=$(echo "$PR_LIST" | jq '[.[] | select(.headRefName | test("^chore/update-preview"))]')
Expand All @@ -40,7 +38,7 @@ jobs:
# Check if any pull requests were found after filtering
if [ -z "$FILTERED_PR_LIST" ] || [ "$FILTERED_PR_LIST" = "[]" ]; then
echo "No pull requests found on branch feat/v2 after filtering"
echo "No pull requests found on branch master after filtering"
exit 0
fi
Expand All @@ -57,13 +55,13 @@ jobs:
- name: Open PR with changes
uses: peter-evans/create-pull-request@v5
with:
title: "chore(feat/v2): updated preview dependencies [automated]"
title: "chore(master): updated preview dependencies [automated]"
body: "This PR updates preview dependencies to the latest versions."
commit-message: "chore(feat/v2): updated preview dependencies [automated]"
commit-message: "chore(master): updated preview dependencies [automated]"
branch: "chore/update-preview"
branch-suffix: "timestamp"
token: ${{ secrets.PAT_TOKEN }}
base: "feat/v2"
base: "master"
add-paths: yarn.lock
committer: "GitHub <[email protected]>"
author: "GitHub <github-actions[bot]@users.noreply.github.com>"

0 comments on commit 5d12a16

Please sign in to comment.