Skip to content

Commit d2db242

Browse files
authored
chore: Minor fix to update SDK (#4340)
1 parent 86aeaf3 commit d2db242

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/autoupdate-sdk.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
./internal/**/*
2727
go.mod
2828
go.sum
29-
- run: make gen-purls
30-
if: steps.verify-changed-files.outputs.files_changed == 'true'
3129
- name: Find JIRA ticket
3230
id: find
3331
if: steps.verify-changed-files.outputs.files_changed == 'true'
@@ -103,7 +101,27 @@ jobs:
103101
_Jira ticket:_ ${{ env.JIRA_KEY }}
104102
105103
Note: Jira ticket will be closed automatically when this PR is merged.
104+
- name: Checkout PR branch
105+
if: steps.verify-changed-files.outputs.files_changed == 'true'
106+
run: |
107+
git fetch origin ${{ env.JIRA_KEY }}
108+
git checkout ${{ env.JIRA_KEY }}
109+
- name: Generate and commit purls.txt
110+
if: steps.verify-changed-files.outputs.files_changed == 'true'
111+
run: |
112+
make gen-purls
113+
echo "Changes to purls.txt:"
114+
if git diff --exit-code build/package/purls.txt; then
115+
echo "No changes to purls.txt"
116+
else
117+
git config --global user.name "${{ steps.app-token.outputs.user-name }}"
118+
git config --global user.email "${{ steps.app-token.outputs.user-email }}"
119+
git add build/package/purls.txt
120+
git commit -m "chore: update purls.txt"
121+
git push origin ${{ env.JIRA_KEY }}
122+
fi
106123
- name: Set auto merge
124+
if: steps.verify-changed-files.outputs.files_changed == 'true'
107125
env:
108126
GH_TOKEN: ${{ steps.app-token.outputs.token }}
109127
run: |

0 commit comments

Comments
 (0)