Skip to content

Commit dce0d2d

Browse files
authored
feat: add sync sn-doc job (#114)
1 parent fffd5fe commit dce0d2d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,35 @@ jobs:
1717
with:
1818
token: ${{ secrets.SNBOT_GITHUB_TOKEN }}
1919
target-branch: ${{ github.ref_name }}
20+
sync-doc:
21+
runs-on: ubuntu-latest
22+
needs: release
23+
steps:
24+
- name: Checkout sn-docs
25+
uses: actions/checkout@v4
26+
with:
27+
repository: streamnative/sn-docs
28+
token: ${{ secrets.SNBOT_GITHUB_TOKEN }}
29+
30+
- name: Update version in docs
31+
run: |
32+
NEW_VERSION="${{ needs.release.outputs.tag_name }}"
33+
FILE_PATH="src/content/03 - Manage StreamNative Clusters/303 - Manage BYOC Infrastructure/2 - Grant Vendor Access/2 - BYOC on AWS/2 - Account Access for BYOC on AWS.md"
34+
sed -i "s|ref=v[0-9]\+\.[0-9]\+\.[0-9]\+|ref=${NEW_VERSION}|" "$FILE_PATH"
35+
36+
- name: Push to release branch
37+
run: |
38+
NEW_VERSION="${{ needs.release.outputs.tag_name }}"
39+
git config --global user.email "[email protected]"
40+
git config --global user.name "streamnativebot"
41+
git checkout -b bump/update-module-version-${NEW_VERSION}
42+
git add .
43+
git commit -m "Upgrade aws vendor access module version to ${NEW_VERSION}"
44+
git push origin --delete bump/update-module-version-${NEW_VERSION} || true
45+
git push --set-upstream origin bump/update-module-version-${NEW_VERSION}
46+
47+
- name: Create PR
48+
env:
49+
GH_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
50+
run: |
51+
gh pr create --title "Upgrade aws vendor access module version to ${{ needs.release.outputs.tag_name }}" --body "This is a PR created by snbot" -R streamnative/sn-doc

0 commit comments

Comments
 (0)