Skip to content

trigger-workflow

trigger-workflow #62

Workflow file for this run

on:
schedule:
- cron: "0 0 * * */7"
workflow_dispatch:
repository_dispatch:
types: [trigger-workflow]
name: Docker images
jobs:
build-images:
name: Build & push Docker images
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
runtime:
- name: freedesktop-23.08
packages: org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08
remote: flathub
- name: freedesktop-24.08
packages: org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08
remote: flathub
- name: gnome-45
packages: org.gnome.Platform//45 org.gnome.Sdk//45
remote: flathub
- name: gnome-46
packages: org.gnome.Platform//46 org.gnome.Sdk//46
remote: flathub
- name: gnome-47
packages: org.gnome.Platform//47 org.gnome.Sdk//47
remote: flathub
- name: kde-5.15-23.08
packages: org.kde.Platform//5.15-23.08 org.kde.Sdk//5.15-23.08
remote: flathub
- name: kde-6.6
packages: org.kde.Platform//6.6 org.kde.Sdk//6.6
remote: flathub
- name: kde-6.7
packages: org.kde.Platform//6.7 org.kde.Sdk//6.7
remote: flathub
services:
registry:
image: registry:latest
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build & push the base image to local registry
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: localhost:5000/base:latest
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime
run: |
cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF
# syntax = docker/dockerfile:experimental
FROM localhost:5000/base:latest
RUN --security=insecure flatpak install -y --noninteractive ${{matrix.runtime.remote}} ${{ matrix.runtime.packages }}
- name: Build & push the ${{ matrix.runtime.name }} image
uses: docker/build-push-action@v5
with:
allow: security.insecure
context: .
file: ${{ matrix.runtime.name }}.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/flathub-infra/flatpak-github-actions:${{ matrix.runtime.name }}