Skip to content

Android 16 to Debian Trixie #502

Android 16 to Debian Trixie

Android 16 to Debian Trixie #502

Workflow file for this run

name: Docker Image Build
on:
push:
branches: [ master ]
paths:
- '*/Dockerfile'
- '.github/workflows/build-test.yml'
pull_request:
branches: [ master ]
paths:
- '*/Dockerfile'
- '.github/workflows/build-test.yml'
jobs:
files:
runs-on: ubuntu-latest-low
outputs:
matrix: ${{ steps.dockerfile.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Get changed files
id: files
uses: jitterbit/get-changed-files@b17fbb00bdc0c0f63fcf166580804b4d2cdc2a42 # v1
with:
format: json
- name: Extract Dockerfile files
id: dockerfile
run: |
FILES=$( echo '${{ steps.files.outputs.added_modified }}' | jq -c 'map(select(. | endswith("Dockerfile")))' )
echo "matrix=$FILES" >> "$GITHUB_OUTPUT"
build:
runs-on: [ubuntu-latest, self-hosted]
needs: files
strategy:
fail-fast: false
matrix:
dockerfile: ${{ fromJSON(needs.files.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
with:
# https://github.com/tonistiigi/binfmt/issues/240
# https://github.com/docker/buildx/issues/1170
image: tonistiigi/binfmt:qemu-v7.0.0-28
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Build Docker image ${{ matrix.dockerfile }}
run: |
IMAGE=$(dirname ${{ matrix.dockerfile }})
cd "$(dirname ${{ matrix.dockerfile }})"
case "$IMAGE" in
client*)
PLATFORM="linux/amd64" ;;
translations*)
PLATFORM="linux/amd64" ;;
*32bit)
PLATFORM="linux/386" ;;
*)
PLATFORM="linux/amd64,linux/arm64" ;;
esac
docker buildx build --platform "$PLATFORM" . --file Dockerfile