Skip to content

Commit

Permalink
checkout with submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed Oct 9, 2024
1 parent e30cb53 commit 172419f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ jobs:
ref: ${{ github.event.inputs.git-ref }}
ssh-key: '${{ secrets.KOMIKKU_DEPLOY }}'

- name: Clone Submodule
run: |
mkdir -p $HOME/.ssh
echo '${{ secrets.ADBLOCKANDROID_DEPLOY }}' > $HOME/.ssh/ssh.key
chmod 600 $HOME/.ssh/ssh.key
export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/ssh.key"
git submodule set-url ${{ env.SUBMODULE_PATH }} [email protected]:${{ env.REPO }}.git
git submodule update --init --recursive
git submodule set-url ${{ env.SUBMODULE_PATH }} https://github.com/${{ env.REPO }}.git
unset GIT_SSH_COMMAND
env:
SUBMODULE_PATH: AdblockAndroid
REPO: komikku-app/AdblockAndroid

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4

Expand Down Expand Up @@ -141,6 +155,20 @@ jobs:
ref: ${{ github.event.inputs.git-ref }}
ssh-key: '${{ secrets.KOMIKKU_DEPLOY }}'

- name: Clone Submodule
run: |
mkdir -p $HOME/.ssh
echo '${{ secrets.ADBLOCKANDROID_DEPLOY }}' > $HOME/.ssh/ssh.key
chmod 600 $HOME/.ssh/ssh.key
export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/ssh.key"
git submodule set-url ${{ env.SUBMODULE_PATH }} [email protected]:${{ env.REPO }}.git
git submodule update --init --recursive
git submodule set-url ${{ env.SUBMODULE_PATH }} https://github.com/${{ env.REPO }}.git
unset GIT_SSH_COMMAND
env:
SUBMODULE_PATH: AdblockAndroid
REPO: komikku-app/AdblockAndroid

- name: Setup Android SDK
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ jobs:
repository: 'komikku-app/komikku'
ref: 'master'

- name: Clone Submodule
run: |
mkdir -p $HOME/.ssh
echo '${{ secrets.ADBLOCKANDROID_DEPLOY }}' > $HOME/.ssh/ssh.key
chmod 600 $HOME/.ssh/ssh.key
export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/ssh.key"
git submodule set-url ${{ env.SUBMODULE_PATH }} [email protected]:${{ env.REPO }}.git
git submodule update --init --recursive
git submodule set-url ${{ env.SUBMODULE_PATH }} https://github.com/${{ env.REPO }}.git
unset GIT_SSH_COMMAND
env:
SUBMODULE_PATH: AdblockAndroid
REPO: komikku-app/AdblockAndroid

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4

Expand Down

0 comments on commit 172419f

Please sign in to comment.