Skip to content

Commit

Permalink
Merge pull request #2510 from kaloudis/build-android
Browse files Browse the repository at this point in the history
GitHub Workflows: Build Android: show hashes
  • Loading branch information
kaloudis authored Nov 2, 2024
2 parents 3b35eed + e25820c commit de59b07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ on:
permissions:
users:
- kaloudis
push:
branches:
- "master"
jobs:
build-android:
runs-on: ubuntu-latest
container: reactnativecommunity/react-native-android@sha256:6607421944d844b82e4d05df50c11dc9fa455108222d63475cd3a0f62465fbda
steps:
- uses: actions/checkout@v4
- name: Envinfo
run: npx envinfo
- name: Build application
run: yarn install && cd android && chmod +x gradlew && ./gradlew app:assembleRelease
run: chmod +x build.sh && bash ./build.sh --no-tty
16 changes: 14 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ BUILDER_IMAGE="reactnativecommunity/react-native-android@sha256:6607421944d844b8
CONTAINER_NAME="zeus_builder_container"
ZEUS_PATH=/olympus/zeus

docker run --rm -it --name $CONTAINER_NAME -v `pwd`:$ZEUS_PATH $BUILDER_IMAGE bash -c \
# Default options for the Docker command
TTY_FLAG="-it"

# Parse arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--no-tty) TTY_FLAG="" ;; # Remove -it if --no-tty is provided
*) echo "Unknown parameter: $1" && exit 1 ;;
esac
shift
done

# Run the Docker command
docker run --rm $TTY_FLAG --name $CONTAINER_NAME -v "$(pwd):$ZEUS_PATH" $BUILDER_IMAGE bash -c \
'echo -e "\n\n********************************\n*** Building ZEUS...\n********************************\n" && \
cd /olympus/zeus ; yarn install --frozen-lockfile && \
cd /olympus/zeus/android ; ./gradlew app:assembleRelease && \
Expand All @@ -18,4 +31,3 @@ docker run --rm -it --name $CONTAINER_NAME -v `pwd`:$ZEUS_PATH $BUILDER_IMAGE ba
sha256sum $RENAMED_FILENAME
done && \
echo -e "\n" ';

0 comments on commit de59b07

Please sign in to comment.