Skip to content

Commit

Permalink
chore(docker): add android-release docker image and it's build script
Browse files Browse the repository at this point in the history
  • Loading branch information
medns authored and zoomchan-cxj committed Aug 3, 2021
1 parent f857529 commit e771f58
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build_android_release_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: '[android] build release image'

on:
workflow_dispatch:
inputs:
tag:
description: 'TAG'
default: 'latest'
required: true
push:
branches:
- master
- main
tags-ignore:
- '**'
paths:
- 'docker/android-release/Dockerfile'
jobs:
push_to_registry:
name: Push Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to ghcr.io
uses: docker/build-push-action@v2
with:
context: docker/android-release
push: true
tags: ghcr.io/${{ github.repository_owner }}/android-release:${{ github.event.inputs.tag || 'latest' }}
12 changes: 12 additions & 0 deletions docker/android-release/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM centos

RUN \
yum -y install git unzip python3 python2 pkg-config bzip2 glibc-devel.i686 libstdc++-devel.i686 ncurses-compat-libs && \
yum clean all && \
ln -fs /usr/bin/python2.7 /usr/bin/python && \
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git && \
curl -O https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip && \
unzip android-ndk-r21e-linux-x86_64.zip && \
rm android-ndk-r21e-linux-x86_64.zip

ENV ANDROID_NDK_HOME=/android-ndk-r21e PATH="/depot_tools:${PATH}"

0 comments on commit e771f58

Please sign in to comment.