Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Workflows: Build Android: show hashes #2510

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" ';

Loading