Automated weekly build of Docker images for Linux runners (#7376)
* Change tag name * Change tag name * Add ARM64 containers and Fedora 40 * Use dnf for Fedora * Dist upgrade on Debian * Upgrade and clean on Fedora * Add name * Fixed typo and use platform in Dockerfile * Use matrix instead for arch * Use config dir in matrix * Fixed wrong var * Specify base image in workflow * Re-add platform * Use slim images * Run on Buildjet * Use new images * Add comment * Remove QEMU (not needed because of Buildjet) * Finish Dockerfile for Arch and OpenSUSE * Use new containers * Use correct config dir names * Fixed config for Manjaro * Missing zypper arg * Clean Arch and OpenSUSE * Update ChangeLog * Elaborate on comment
This commit is contained in:
6
.github/docker/archlinux/Dockerfile
vendored
Normal file
6
.github/docker/archlinux/Dockerfile
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE AS base
|
||||
|
||||
RUN pacman -Syu --noconfirm git python sudo && pacman -Scc --noconfirm
|
||||
|
||||
RUN useradd -m build
|
||||
3
.github/docker/debian-12/Dockerfile
vendored
3
.github/docker/debian-12/Dockerfile
vendored
@ -1,3 +0,0 @@
|
||||
FROM debian:12
|
||||
|
||||
RUN apt update && apt install -y git python3 && apt clean
|
||||
4
.github/docker/debian/Dockerfile
vendored
Normal file
4
.github/docker/debian/Dockerfile
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE AS base
|
||||
|
||||
RUN apt update && apt dist-upgrade -y && apt install -y git python3 && apt clean
|
||||
4
.github/docker/fedora/Dockerfile
vendored
Normal file
4
.github/docker/fedora/Dockerfile
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE AS base
|
||||
|
||||
RUN dnf upgrade -y && dnf install -y git python3 && dnf clean all
|
||||
4
.github/docker/opensuse/Dockerfile
vendored
Normal file
4
.github/docker/opensuse/Dockerfile
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM $BASE_IMAGE AS base
|
||||
|
||||
RUN zypper refresh && zypper update -y && zypper install -y git python3 && zypper clean --all
|
||||
84
.github/workflows/build-containers.yml
vendored
84
.github/workflows/build-containers.yml
vendored
@ -1,3 +1,11 @@
|
||||
# Weekly build of the Linux Docker containers.
|
||||
#
|
||||
# The objective is to reduce the problem where package updates often break the build process
|
||||
# due to transient network errors.
|
||||
#
|
||||
# We use Docker Buildx instead of Docker Automated Builds so that we can create an image that is
|
||||
# always at most a week out of date (instead of the last time a Dockerfile change was pushed).
|
||||
|
||||
name: Build containers
|
||||
|
||||
on:
|
||||
@ -7,8 +15,73 @@ on:
|
||||
|
||||
jobs:
|
||||
build-containers:
|
||||
runs-on: ubuntu-latest
|
||||
name: ${{ matrix.os.name }}
|
||||
runs-on: ${{ matrix.os.runs-on }}
|
||||
if: ${{ vars.BUILD_CONTAINERS }}
|
||||
timeout-minutes: 5
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- name: debian-12-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: debian
|
||||
base-image: debian:12-slim
|
||||
platform: amd64
|
||||
|
||||
- name: debian-12-arm64
|
||||
runs-on: buildjet-4vcpu-ubuntu-2204-arm
|
||||
config-dir: debian
|
||||
base-image: arm64v8/debian:12-slim
|
||||
platform: arm64
|
||||
|
||||
- name: ubuntu-24.04-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: debian
|
||||
base-image: ubuntu:24.04
|
||||
platform: amd64
|
||||
|
||||
- name: ubuntu-22.04-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: debian
|
||||
base-image: ubuntu:22.04
|
||||
platform: amd64
|
||||
|
||||
- name: fedora-40-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: fedora
|
||||
base-image: fedora:40
|
||||
platform: amd64
|
||||
|
||||
- name: fedora-40-arm64
|
||||
runs-on: buildjet-4vcpu-ubuntu-2204-arm
|
||||
config-dir: fedora
|
||||
base-image: arm64v8/fedora:40
|
||||
platform: arm64
|
||||
|
||||
- name: fedora-39-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: fedora
|
||||
base-image: fedora:39
|
||||
platform: amd64
|
||||
|
||||
- name: opensuse-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: opensuse
|
||||
base-image: opensuse/tumbleweed:latest
|
||||
platform: amd64
|
||||
|
||||
- name: archlinux-amd64
|
||||
runs-on: ubuntu-latest
|
||||
config-dir: archlinux
|
||||
base-image: archlinux:latest
|
||||
platform: amd64
|
||||
|
||||
- name: manjaro-amd64
|
||||
config-dir: archlinux
|
||||
runs-on: ubuntu-latest
|
||||
base-image: manjarolinux/base:latest
|
||||
platform: amd64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -26,8 +99,9 @@ jobs:
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./.github/docker/debian-12/
|
||||
file: ./.github/docker/debian-12/Dockerfile
|
||||
push: true
|
||||
tags: symless/debian:12
|
||||
platforms: linux/amd64,linux/arm64
|
||||
context: ./.github/docker/${{ matrix.os.config-dir }}
|
||||
file: ./.github/docker/${{ matrix.os.config-dir }}/Dockerfile
|
||||
tags: symless/synergy-core:${{ matrix.os.name }}
|
||||
build-args: BASE_IMAGE=${{ matrix.os.base-image }}
|
||||
platforms: linux/${{ matrix.os.platform }}
|
||||
|
||||
60
.github/workflows/ci.yml
vendored
60
.github/workflows/ci.yml
vendored
@ -187,72 +187,50 @@ jobs:
|
||||
matrix:
|
||||
distro:
|
||||
- name: debian-12-arm64
|
||||
container: arm64v8/debian:12
|
||||
container: symless/synergy-core:debian-12-arm64
|
||||
runs-on: buildjet-4vcpu-ubuntu-2204-arm
|
||||
install-deps-apt: true
|
||||
|
||||
- name: debian-12-amd64
|
||||
container: debian:12
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-apt: true
|
||||
|
||||
- name: ubuntu-24.04-amd64
|
||||
container: ubuntu:24.04
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-apt: true
|
||||
extra-packages: true
|
||||
|
||||
- name: ubuntu-22.04-amd64
|
||||
container: ubuntu:22.04
|
||||
- name: debian-12-amd64
|
||||
container: symless/synergy-core:debian-12-amd64
|
||||
runs-on: ubuntu-latest
|
||||
extra-packages: true
|
||||
|
||||
- name: ubuntu-24.04-amd64
|
||||
container: symless/synergy-core:ubuntu-24.04-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: ubuntu-22.04-amd64
|
||||
container: symless/synergy-core:ubuntu-22.04-amd64
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-apt: true
|
||||
|
||||
- name: fedora-40-arm64
|
||||
container: arm64v8/fedora:40
|
||||
container: symless/synergy-core:fedora-40-arm64
|
||||
runs-on: buildjet-4vcpu-ubuntu-2204-arm
|
||||
install-deps-dnf: true
|
||||
|
||||
- name: fedora-40-amd64
|
||||
container: fedora:40
|
||||
container: symless/synergy-core:fedora-40-amd64
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-dnf: true
|
||||
|
||||
- name: fedora-39-amd64
|
||||
container: fedora:39
|
||||
container: symless/synergy-core:fedora-39-amd64
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-dnf: true
|
||||
|
||||
- name: opensuse-amd64
|
||||
container: opensuse/tumbleweed:latest
|
||||
container: symless/synergy-core:opensuse-amd64
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-zypper: true
|
||||
|
||||
- name: arch-amd64
|
||||
container: archlinux:latest
|
||||
- name: archlinux-amd64
|
||||
container: symless/synergy-core:archlinux-amd64
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-pacman: true
|
||||
package-user: build
|
||||
|
||||
- name: manjaro-amd64
|
||||
container: manjarolinux/base:latest
|
||||
container: symless/synergy-core:manjaro-amd64
|
||||
runs-on: ubuntu-latest
|
||||
install-deps-pacman: true
|
||||
package-user: build
|
||||
|
||||
steps:
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
if [ "${{ matrix.distro.install-deps-apt }}" = "true" ]; then
|
||||
apt update && apt install -y git python3
|
||||
elif [ "${{ matrix.distro.install-deps-dnf }}" = "true" ]; then
|
||||
dnf install -y git python3
|
||||
elif [ "${{ matrix.distro.install-deps-pacman }}" = "true" ]; then
|
||||
pacman -Syu --noconfirm git python sudo
|
||||
useradd -m build
|
||||
elif [ "${{ matrix.distro.install-deps-zypper }}" = "true" ]; then
|
||||
zypper install -y git python3
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user