You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/update-stores.yml
+30-27Lines changed: 30 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,15 @@ jobs:
28
28
run: |
29
29
echo "TARGET_REPO_BRANCH=${{ github.event.client_payload.targetRef }}" | tee -a $GITHUB_ENV
30
30
echo "KFUTIL_ARG=${{ github.event.client_payload.targetRepo }}" | tee -a $GITHUB_ENV
31
+
- name: Set Branch Name based on targetRef
32
+
id: set-branch-name
33
+
run: |
34
+
if [ "${{ env.TARGET_REPO_BRANCH }}" == "main" ]; then
35
+
echo "BRANCH_NAME=${{ env.KFUTIL_ARG }}_${{ env.TARGET_REPO_BRANCH }}" | tee -a $GITHUB_ENV
36
+
else
37
+
echo "BRANCH_NAME=${{ env.KFUTIL_ARG }}" | tee -a $GITHUB_ENV
38
+
fi
39
+
31
40
- name: Check Open PRs for Existing Branch
32
41
id: check-branch
33
42
uses: actions/github-script@v7
@@ -41,8 +50,8 @@ jobs:
41
50
repo,
42
51
state: "open"
43
52
});
44
-
// Filter out ones matching the KFUTIL_ARG from payload (repository_dispatch) or input (workflow_dispatch)
45
-
const filteredData = pulls.data.filter(item => item.head.ref === '${{ env.KFUTIL_ARG }}'); // Look for an existing branch with the orchestrator repo name
53
+
// Filter out ones matching our branch naming convention
0 commit comments