Skip to content

Commit 664e3c7

Browse files
committed
fix(ci): Generate PR into caller branch for store-type updates.
Signed-off-by: spbsoluble <[email protected]>
1 parent b19462b commit 664e3c7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/update-stores.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ jobs:
102102
working-directory: ./tools/store-type-merge
103103
run: |
104104
python main.py --repo-name ${{ env.KFUTIL_ARG }} --ref ${{ env.TARGET_REPO_BRANCH }}
105-
pwd
106-
ls -la
107-
ls -la ../
108-
ls -la ../../
109-
cp -f store_types.json ../../cmd/store_types.json
110105
env:
111106
GITHUB_TOKEN: ${{ secrets.V2BUILDTOKEN }}
112107

@@ -138,7 +133,10 @@ jobs:
138133
run: |
139134
echo "Saving original store_types.json as store_types.sav.json"
140135
cp -f ./tools/store-type-merge/store_types.json ./merge-folder/store_types.json
136+
mkdir -p ./merge-folder/cmd || true
141137
cp -f ./tools/store-type-merge/store_types.json ./merge-folder/cmd/store_types.json # this necessary?
138+
ls -la ./merge-folder/
139+
ls -la ./merge-folder/cmd/
142140
143141
# Diff the new json against the saved copy and set an UPDATE_FILE variable
144142
- name: Diff the results
@@ -159,7 +157,9 @@ jobs:
159157
env:
160158
GITHUB_TOKEN: ${{ secrets.SDK_SYNC_PAT }}
161159
with:
162-
add: store_types.json cmd/store_types.json --force
160+
add: |
161+
store_types.json
162+
./cmd/store_types.json --force
163163
message: Update store_types.json for ${{env.KFUTIL_ARG}}:${{env.TARGET_REPO_BRANCH}}
164164
author_name: Keyfactor
165165
author_email: [email protected]
@@ -172,7 +172,9 @@ jobs:
172172
env:
173173
GITHUB_TOKEN: ${{ secrets.SDK_SYNC_PAT }}
174174
with:
175-
add: store_types.json cmd/store_types.json --force
175+
add: |
176+
store_types.json
177+
./cmd/store_types.json --force
176178
message: Update store_types.json for ${{env.KFUTIL_ARG}}:${{env.TARGET_REPO_BRANCH}}
177179
author_name: Keyfactor
178180
author_email: [email protected]
@@ -187,7 +189,7 @@ jobs:
187189
console.log("Commit to ${{env.KFUTIL_ARG}} for PR")
188190
const owner = context.repo.owner;
189191
const repo = context.repo.repo;
190-
const baseBranch = 'main';
192+
const baseBranch = context.ref.replace('refs/heads/', 'main'); // Default base branch is main
191193
const newBranch = '${{env.KFUTIL_ARG}}';
192194
const response = await github.rest.pulls.create({
193195
owner,

0 commit comments

Comments
 (0)