Skip to content

Docker images

Docker images #27

Workflow file for this run

on:
workflow_dispatch:
name: Docker images
env:
REGISTRY: ghcr.io
jobs:
build-images:
name: Build & push Docker images
runs-on: ubuntu-latest
strategy:
matrix:
runtime:
- name: gtk-nightly
gtktag: main
adwtag: main
- name: gtk-4.6
gtktag: 4.6.3
adwtag: 1.1.1
- name: gtk-4.8
gtktag: 4.8.2
adwtag: 1.2.0
- name: gtk-4.10
gtktag: 4.10.0
adwtag: 1.3.2
- name: gtk-4.12
gtktag: 4.12.4
adwtag: 1.4.3
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Repository
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
mglolenstine/gtk4-cross
ghcr.io/mglolenstine/gtk4-cross
tags: |
${{ matrix.runtime.name }}
- name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime
run: |
sed -i 's/%GTKTAG%/${{matrix.runtime.gtktag}}/g' gtk4-cross-base-hub/Dockerfile && sed -i 's/%ADWTAG%/${{matrix.runtime.adwtag}}/g' gtk4-cross-base-hub/Dockerfile
- name: Build & push the ${{ matrix.runtime.name }} image to Docker Hub
uses: docker/build-push-action@v2.2.2
continue-on-error: false
with:
context: ./gtk4-cross-base-hub
file: ./gtk4-cross-base-hub/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Extract metadata (tags, labels) for Docker
id: meta_rust
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
mglolenstine/gtk4-cross
ghcr.io/mglolenstine/gtk4-cross
tags: |
rust-${{ matrix.runtime.name }}
- name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime
run: |
sed -i 's/%GTKTAG%/${{matrix.runtime.name}}/g' gtk4-cross-rust/Dockerfile
- name: Build & push the rust-${{ matrix.runtime.name }} image to Docker Hub
uses: docker/build-push-action@v2.2.2
continue-on-error: false
with:
context: ./gtk4-cross-rust
file: ./gtk4-cross-rust/Dockerfile
push: true
tags: ${{ steps.meta_rust.outputs.tags }}
labels: ${{ steps.meta_rust.outputs.labels }}