Build Docker images #284
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker images | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: 0 4 * * SUN | |
workflow_dispatch: | |
jobs: | |
tier1: | |
name: Build Tier 1 images | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
images: | |
- { context: "alpine", tags: "1maa/alpine:3.20,1maa/alpine:latest", cache-tag: "1maa/alpine:3.20" } | |
- { context: "beanstalkd", tags: "1maa/beanstalkd:latest" } | |
- { context: "core-lightning", tags: "1maa/core-lightning:latest", dockerfile: "core-lightning/alpine/Dockerfile" } | |
- { context: "electrs", tags: "1maa/electrs:latest" } | |
- { context: "erlang", tags: "1maa/erlang:25-alpine", build-arg: "ERLANG_VERSION=25.3.2.13" } | |
- { context: "erlang", tags: "1maa/erlang:26-alpine", build-arg: "ERLANG_VERSION=26.2.5.2" } | |
- { context: "erlang", tags: "1maa/erlang:27-alpine,1maa/erlang:latest", cache-tag: "1maa/erlang:27-alpine" } | |
- { context: "lua", tags: "1maa/lua:5.4" } | |
- { context: "protoc", tags: "1maa/protoc:latest" } | |
- { context: "sakila", tags: "1maa/sakila:latest" } | |
- { context: "selfsig", tags: "1maa/selfsig:latest" } | |
- { context: "sleepy", tags: "1maa/sleepy:latest" } | |
- { context: "sqlite", tags: "1maa/sqlite:latest" } | |
- { context: "xhgui", tags: "1maa/xhgui:latest" } | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/docker-generic | |
with: | |
build-arg: ${{ matrix.images.build-arg || '' }} | |
second-arg: ${{ matrix.images.second-arg || '' }} | |
cache-tag: ${{ matrix.images.cache-tag || matrix.images.tags }} | |
context: ${{ matrix.images.context }} | |
docker-hub-pass: ${{ secrets.DOCKER_HUB_PASS }} | |
docker-hub-user: 1maa | |
dockerfile: ${{ matrix.images.dockerfile || format('{0}/Dockerfile', matrix.images.context) }} | |
tags: ${{ matrix.images.tags }} | |
tier2: | |
name: Build Tier 2 images | |
runs-on: ubuntu-latest | |
needs: | |
- tier1 | |
strategy: | |
fail-fast: false | |
matrix: | |
images: | |
- { context: "haproxy", tags: "1maa/haproxy:3.0" } | |
- { context: "postgres", tags: "1maa/postgres:12-alpine", build-arg: "POSTGRES_VERSION=12.20" } | |
- { context: "postgres", tags: "1maa/postgres:13-alpine", build-arg: "POSTGRES_VERSION=13.16" } | |
- { context: "postgres", tags: "1maa/postgres:14-alpine", build-arg: "POSTGRES_VERSION=14.13" } | |
- { context: "postgres", tags: "1maa/postgres:15-alpine", build-arg: "POSTGRES_VERSION=15.8" } | |
- { context: "postgres", tags: "1maa/postgres:16-alpine" } | |
- { context: "sftp", tags: "1maa/sftp:latest" } | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/docker-generic | |
with: | |
build-arg: ${{ matrix.images.build-arg || '' }} | |
cache-tag: ${{ matrix.images.cache-tag || matrix.images.tags }} | |
context: ${{ matrix.images.context }} | |
docker-hub-pass: ${{ secrets.DOCKER_HUB_PASS }} | |
docker-hub-user: 1maa | |
dockerfile: ${{ matrix.images.dockerfile || format('{0}/Dockerfile', matrix.images.context) }} | |
tags: ${{ matrix.images.tags }} | |
tier2-php: | |
name: Build PHP images (Tier 2) | |
runs-on: ubuntu-latest | |
needs: | |
- tier1 | |
strategy: | |
fail-fast: false | |
matrix: | |
images: | |
- { tag: "1maa/php:8.1", dev-tag: "1maa/php-dev:8.1", dockerfile: "php/8.1/Dockerfile" } | |
- { tag: "1maa/php:8.2", dev-tag: "1maa/php-dev:8.2", dockerfile: "php/8.2/Dockerfile" } | |
- { tag: "1maa/php:8.3", dev-tag: "1maa/php-dev:8.3", dockerfile: "php/8.3/Dockerfile" } | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/docker-php | |
with: | |
tag: ${{ matrix.images.tag }} | |
dev-tag: ${{ matrix.images.dev-tag }} | |
docker-hub-pass: ${{ secrets.DOCKER_HUB_PASS }} | |
docker-hub-user: 1maa | |
dockerfile: ${{ matrix.images.dockerfile }} |