-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Separate android-sdk image into a base image and separate image for…
… each API level. - Improve CI workflow.
- Loading branch information
1 parent
e8c9e4b
commit 4991ea1
Showing
28 changed files
with
204 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
base_image: | ||
- android-sdk-*.Dockerfile | ||
- publish_android_sdk_base_image.sh | ||
sdk_images: | ||
- android-sdk-*.Dockerfile | ||
- publish_android_sdk_image.sh | ||
emulator_images: | ||
- android-emulator-*.Dockerfile | ||
- publish_android_emulator_image.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build and Publish Images | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 3' # build and publish images every Wednesday | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish-base-image: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: '.github/filters.yml' | ||
- name: Docker login | ||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.base_image == 'true' }} | ||
run: echo "$DOCKER_TOKEN" | docker login --username=$DOCKER_USER --password-stdin | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and publish android-sdk-base.Dockerfile | ||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.base_image == 'true' }} | ||
run: sh publish_android_sdk_base_image.sh | ||
|
||
publish-sdk-image: | ||
needs: publish-base-image | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
api-level: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: '.github/filters.yml' | ||
- name: Docker login | ||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.base_image == 'true' || steps.filter.outputs.sdk_images == 'true' }} | ||
run: echo "$DOCKER_TOKEN" | docker login --username=$DOCKER_USER --password-stdin | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and publish android-sdk-${{ matrix.api-level }}.Dockerfile | ||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.base_image == 'true' || steps.filter.outputs.sdk_images == 'true' }} | ||
run: sh publish_android_sdk_image.sh ${{ matrix.api-level }} | ||
|
||
publish-emulator-image: | ||
needs: publish-sdk-image | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
api-level: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: '.github/filters.yml' | ||
- name: Docker login | ||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.base_image == 'true' || steps.filter.outputs.sdk_images == 'true' || steps.filter.outputs.emulator_images == 'true' }} | ||
run: echo "$DOCKER_TOKEN" | docker login --username=$DOCKER_USER --password-stdin | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and publish android-emulator-${{ matrix.api-level }}.Dockerfile | ||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.base_image == 'true' || steps.filter.outputs.sdk_images == 'true' || steps.filter.outputs.emulator_images == 'true' }} | ||
run: sh publish_android_emulator_image.sh ${{ matrix.api-level }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=21 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=22 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=23 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=24 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=25 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=26 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=27 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=28 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=29 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM reactivecircus/android-sdk-base:latest | ||
|
||
# Install Android platform | ||
ENV API_LEVEL=30 | ||
|
||
RUN sdkmanager --install "platforms;android-${API_LEVEL}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
# generate a new image version from the current time | ||
IMAGE_VERSION=`date "+v%Y_%m_%d-%H-%M-%S"` | ||
|
||
# build the docker image with new version and tag | ||
docker build -t reactivecircus/android-sdk-base:latest -t reactivecircus/android-sdk-base:${IMAGE_VERSION} -f android-sdk-base.Dockerfile . | ||
|
||
# publish to Docker Hub | ||
docker push reactivecircus/android-sdk-base:${IMAGE_VERSION} | ||
docker push reactivecircus/android-sdk-base:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# API level passed in as argument | ||
API=$1 | ||
|
||
# generate a new image version from the current time | ||
IMAGE_VERSION=`date "+v%Y_%m_%d-%H-%M-%S"` | ||
|
||
# build the docker image with new version and tag | ||
docker build -t reactivecircus/android-sdk:latest -t reactivecircus/android-sdk:${IMAGE_VERSION} -f android-sdk.Dockerfile . | ||
docker build -t reactivecircus/android-sdk-${API}:latest -t reactivecircus/android-sdk-${API}:${IMAGE_VERSION} -f android-sdk-${API}.Dockerfile . | ||
|
||
# publish to Docker Hub | ||
docker push reactivecircus/android-sdk:${IMAGE_VERSION} | ||
docker push reactivecircus/android-sdk:latest | ||
docker push reactivecircus/android-sdk-${API}:${IMAGE_VERSION} | ||
docker push reactivecircus/android-sdk-${API}:latest |