build base image first, then build everything else #46
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 and push Docker images | |
on: | |
schedule: | |
- cron: "15 14 * * *" | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-base: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: Build base image | |
uses: ./.github/actions/docker-build.yml | |
with: | |
variant: base | |
build-all: | |
needs: build-base | |
strategy: | |
fail-fast: false | |
matrix: | |
variant: | |
- gnome | |
- flagship | |
- xfce | |
- kde | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: Build all images | |
uses: ./.github/actions/docker-build.yml | |
with: | |
variant: ${{ matrix.variant }} |