Skip to content

[pre-commit.ci] pre-commit autoupdate (#1016) #623

[pre-commit.ci] pre-commit autoupdate (#1016)

[pre-commit.ci] pre-commit autoupdate (#1016) #623

Workflow file for this run

name: docker build
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
build_base:
name: build base image
runs-on: ubuntu-latest
steps:
- name: free disk
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
file: docker/base/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:base
cache-from: |
type=gha,scope=base
type=registry,ref=ghcr.io/${{ github.repository }}:base
cache-to: type=gha,mode=max,scope=base
build-args: |
BUILDKIT_INLINE_CACHE=1
build_ccache:
name: build ccache image
needs: build_base
runs-on: ubuntu-latest
steps:
- name: free disk
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
file: docker/ccache/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:ccache
cache-from: |
type=gha,scope=ccache
type=registry,ref=ghcr.io/${{ github.repository }}:ccache
cache-to: type=gha,mode=max,scope=ccache
build-args: |
BUILDKIT_INLINE_CACHE=1
build_prebuilt:
name: build prebuilt image
needs: build_base
runs-on: ubuntu-latest
steps:
- name: free disk
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
file: docker/prebuilt/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:prebuilt
cache-from: |
type=gha,scope=prebuilt
type=registry,ref=ghcr.io/${{ github.repository }}:prebuilt
cache-to: type=gha,mode=max,scope=prebuilt
build-args: |
BUILDKIT_INLINE_CACHE=1