Skip to content

Merge pull request #15 from saschpe/android-35 #40

Merge pull request #15 from saschpe/android-35

Merge pull request #15 from saschpe/android-35 #40

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- .gitignore
- LICENSE
- README.md
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
IMAGE: saschpe/android-ndk
PLATFORMS: linux/amd64,linux/arm64
jobs:
buildx:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
jdk: [ 17.0.12_7, 21.0.4_7, 22.0.2_9 ]
android: [ 34, 35 ]
ndk: [ 26.3.11579264, 27.0.12077973 ]
cmake: [ 3.22.1 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE }}
ghcr.io/${{ env.IMAGE }}
tags: |
type=raw,value=${{ matrix.android }}-jdk${{ matrix.jdk }}-ndk${{ matrix.ndk }}-cmake${{ matrix.cmake }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Github Container Repository
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ env.PLATFORMS }}
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
jdk=${{ matrix.jdk }}
android=${{ matrix.android }}
ndk=${{ matrix.ndk }}
cmake=${{ matrix.cmake }}
provenance: true
cache-from: type=registry,ref=user/app:latest
cache-to: type=inline
- name: Update Docker Hub repository description
if: ${{ github.ref == 'refs/heads/main' }}
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ env.IMAGE }}
short-description: ${{ github.event.repository.description }}