Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Refresh UI (#225)

Refresh UI (#225) #178

Workflow file for this run

name: Docker CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
paths:
- "Dockerfile.base"
- "Dockerfile.app"
- ".github/workflows/docker.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BASE_IMAGE_NAME: gem-android-base
DOCKER_BUILDKIT: 1
jobs:
build_base_image:
name: Build Base Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
image_tag: ${{ steps.meta.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata for base image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.BASE_IMAGE_NAME }}
# Generate a version tag based on commit SHA. This will be unique.
tags: |
type=sha,format=long,prefix=
- name: Build and load Dockerfile.base
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.base
push: false
load: true
tags: ${{ env.BASE_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
build-args: |
BUILDKIT_INLINE_CACHE=1
- name: Save base image to tarball
run: docker save ${{ env.BASE_IMAGE_NAME }}:${{ steps.meta.outputs.version }} -o base_image.tar
- name: Upload base image artifact
uses: actions/upload-artifact@v4
with:
name: base-image-artifact
path: base_image.tar
retention-days: 1
build_app_image:
name: Build App Docker Image
needs: build_base_image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download base image artifact
uses: actions/download-artifact@v4
with:
name: base-image-artifact
- name: Load base image from tarball
run: docker load -i base_image.tar
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
- name: Create local.properties for CI
run: |
echo "gpr.username=${{ github.actor }}" > local.properties
echo "gpr.token=${{ secrets.GITHUB_TOKEN }}" >> local.properties
echo "# Automatically generated for CI build" >> local.properties
- name: Build Dockerfile.app
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.app
build-args: |
TAG=${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
BASE_IMAGE_TAG=${{ needs.build_base_image.outputs.image_tag }}
SKIP_SIGN=true
push: false
load: true
tags: gem-android-app:latest
platforms: linux/amd64
- name: Extract AAB from Docker container
run: |
# Create container from the built image
CONTAINER_ID=$(docker create gem-android-app:latest)
# Copy AAB files from container to host
docker cp $CONTAINER_ID:/root/gem-android/app/build/outputs/bundle/googleRelease/ ./aab-output/
# Clean up container
docker rm $CONTAINER_ID
# List the extracted files
find ./aab-output -name "*.aab"
- name: Upload AAB artifacts
uses: actions/upload-artifact@v4
with:
name: gem-android-aab
path: ./aab-output/
retention-days: 7