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

Publish Base Image

Publish Base Image #6

name: Publish Base Image
on:
workflow_dispatch:
inputs: {}
permissions:
contents: read
packages: write
env:
BASE_IMAGE_NAME: gem-android-base
BASE_IMAGE_FULL_NAME: ghcr.io/${{ github.repository_owner }}/gem-android-base
BASE_IMAGE_TAG_FILE: reproducible/base_image_tag.txt
DOCKER_BUILDKIT: 1
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read base image tag
id: base_tag
run: |
TAG=$(cat "${{ env.BASE_IMAGE_TAG_FILE }}")
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
echo "Base image tag: ${TAG}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push base image
env:
BASE_TAG: ${{ steps.base_tag.outputs.tag }}
run: |
docker buildx build \
--pull \
--no-cache \
--platform linux/amd64,linux/arm64 \
-t ${BASE_IMAGE_FULL_NAME}:${BASE_TAG} \
-t ${BASE_IMAGE_FULL_NAME}:latest \
--push \
.