Skip to content

Docker

Docker #805

Workflow file for this run

---
name: Docker
on:
workflow_dispatch:
schedule:
- cron: "0 6 1/5 * *"
jobs:
publish_docker:
name: Publish Docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- aarch64
version:
- 'daily'
- '6.1'
- '7'
- '7.1'
- '7.2'
services:
registry:
image: registry:latest
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & push the base image to local registry
uses: docker/[email protected]
with:
context: .
push: true
tags: localhost:5000/ubuntu-base:latest
- name: Write the Dockerfile for the ${{ matrix.version }}-${{ matrix.arch }} runtime
run: |
cat <<EOF > ${{ matrix.version }}-${{ matrix.arch }}.Dockerfile
# syntax = docker/dockerfile:experimental
FROM localhost:5000/ubuntu-base:latest
RUN flatpak install -y --noninteractive appcenter io.elementary.Platform/${{ matrix.arch }}/${{ matrix.version }} io.elementary.Sdk/${{ matrix.arch }}/${{ matrix.version }}
EOF
- name: Set additional tags for the default x86_64 runtimes
if: matrix.arch == 'x86_64'
run: |
echo "additional_tags=,ghcr.io/${{ github.repository }}/runtime:${{ matrix.version }}" >> $GITHUB_ENV
- name: Build & push the ${{ matrix.version }}-${{ matrix.arch }} image
uses: docker/[email protected]
with:
context: .
push: true
file: ${{ matrix.version }}-${{ matrix.arch }}.Dockerfile
tags: ghcr.io/${{ github.repository }}/runtime:${{ matrix.version }}-${{ matrix.arch }}${{ env.additional_tags }}