Skip to content

Commit

Permalink
update branch names
Browse files Browse the repository at this point in the history
  • Loading branch information
AniketSK committed Jun 27, 2024
1 parent f314b15 commit dd61982
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ jobs:
build:

runs-on: ubuntu-latest
env:
BRANCH_NAME: "size-docs-for-android-sdk-${{github.ref_name}}"

steps:
- uses: actions/checkout@v4
Expand All @@ -31,8 +29,8 @@ jobs:
- name: Decrypt the keystore properties
run: gpg --quiet --batch --yes --decrypt --passphrase='${{ secrets.KEYSTORE_PROPERTIES_DECRYPT_PASSWORD }}' --output app/sample-keystore.properties sample-keystore.properties.gpg

- name: Collect versions from gradle.properties into env
run: echo "PYTHON_VERSION_ARGS=$(./gradlew -q printPythonScriptArgs)" >> $GITHUB_ENV
- name: Collect Branch Name from gradle.properties into env
run: echo "BRANCH_COMPLETE_NAME=size-docs-for-android-sdk-$(./gradlew -q branchSuffixForDocsPR)" >> $GITHUB_ENV

- name: Build with Gradle
run: ./gradlew assembleRelease
Expand All @@ -54,15 +52,15 @@ jobs:
run: |
git config --global user.name "Aniket Kadam"
git config --global user.email "[email protected]"
git checkout -b $BRANCH_NAME
git checkout -b $BRANCH_COMPLETE_NAME
git add ./docs/android/v2/how-to-guides/install-the-sdk/size.mdx
git commit -m "Adding size docs for versions $(./gradlew -q printPythonScriptArgs)"
- name: Push up the docs branch
working-directory: 100ms-docs
run: git push --set-upstream origin $BRANCH_NAME
run: git push --set-upstream origin $BRANCH_COMPLETE_NAME

- name: Open a PR
working-directory: 100ms-docs
run: |
curl -m 120 -XPOST -H 'accept: application/vnd.github+json' -H "Authorization: Bearer ${{ secrets.ANDROID_SDK_CLONE_TOKEN }}" -H 'X-GitHub-Api-Version: 2022-11-28' -d '{"title":"Android API reference docs PR","body":"api reference docs update", "base":"qa","head":"'$BRANCH_NAME'"}' 'https://api.github.com/repos/100mslive/100ms-docs/pulls'
curl -m 120 -XPOST -H 'accept: application/vnd.github+json' -H "Authorization: Bearer ${{ secrets.ANDROID_SDK_CLONE_TOKEN }}" -H 'X-GitHub-Api-Version: 2022-11-28' -d '{"title":"Size docs for android","body":"api reference docs update", "base":"qa","head":"'$BRANCH_COMPLETE_NAME'"}' 'https://api.github.com/repos/100mslive/100ms-docs/pulls'
4 changes: 4 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,7 @@ dependencies {
tasks.register("printPythonScriptArgs") {
print("$hmsVersion $roomKitVersion")
}

tasks.register("branchSuffixForDocsPR") {
print("$hmsVersion-$roomKitVersion")
}

0 comments on commit dd61982

Please sign in to comment.