This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-samples.git
The following commit(s) were added to refs/heads/main by this push:
new 9dd6450 Replace `android-actions` with script
9dd6450 is described below
commit 9dd6450648ff3a12be2d9442d44223701d88f4df
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Wed Oct 9 14:18:51 2024 +0200
Replace `android-actions` with script
---
.github/workflows/android-reusable-test.yaml | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/android-reusable-test.yaml
b/.github/workflows/android-reusable-test.yaml
index aeccdbd..6bd06ab 100644
--- a/.github/workflows/android-reusable-test.yaml
+++ b/.github/workflows/android-reusable-test.yaml
@@ -44,7 +44,30 @@ jobs:
java-version: 17
- name: Setup Android SDK
- uses:
android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # 3.2.1
+ shell: bash
+ env:
+ ANDROID_SDK_VERSION: 10406996
+ ANDROID_SDK_CHECKSUM:
8919e8752979db73d8321e9babe2caedcc393750817c1a5f56c128ec442fb540
+ run: |
+ # Create home directory
+ export ANDROID_HOME=$HOME/.android/sdk
+ mkdir -p $ANDROID_HOME
+
+ # Download and verify the `cmdline-tools`
+ curl -O $ANDROID_HOME/cmdline-tools.zip
https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip
+ echo "$ANDROID_SDK_CHECKSUM $ANDROID_HOME/cmdline-tools.zip" |
sha256sum -c
+ unzip -d $ANDROID_HOME/cmdline-tools{,.zip}
+ mv $ANDROID_HOME/cmdline-tools/{cmdline-tools,latest}
+
+ # Accept licenses
+ yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --licenses
+
+ # Installing the remaining tools
+ $ANDROID_HOME/cmdline-tools/bin/sdkmanager tools platform-tools
+
+ # Exporting ANDROID_HOME and adding sdkmanager to the PATH
+ echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
+ echo $ANDROID_HOME/cmdline-tools/bin >> $GITHUB_PATH
- name: Build
id: build