mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
Many pushes to master left over a hundred runs queued, because every push used its own concurrency group. Group push runs by ref and cancel the in-flight run on master for the test, lint and E2E workflows. PR, tag, schedule and dispatch runs keep groups that a master push cannot cancel. The intel cache job pushes one fixed tag, so it now keeps at most one pending run per event and never cancels a running build. image.yml and backend.yml are unchanged: they build from the diff of a single push, so replacing a queued run could skip a code commit. Document the policy in .agents/ci-caching.md. Assisted-by: Claude:claude-sonnet-5-5 python3
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
# Concurrency policy: this job pushes one fixed tag, so only the newest build
|
|
# matters. A running build is never cancelled (cancel-in-progress is false);
|
|
# GitHub keeps at most one pending run per group and replaces an older pending
|
|
# run with a newer one. Push and workflow_dispatch use separate groups, so a
|
|
# manual run is never replaced by a push.
|
|
name: 'generate and publish intel docker caches'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
concurrency:
|
|
group: intel-cache-${{ github.event_name }}-${{ github.repository }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
generate_caches:
|
|
if: github.repository == 'mudler/LocalAI'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- base-image: intel/oneapi-basekit:2025.3.2-0-devel-ubuntu24.04
|
|
runs-on: 'arc-runner-set'
|
|
platforms: 'linux/amd64'
|
|
runs-on: ${{matrix.runs-on}}
|
|
steps:
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@master
|
|
with:
|
|
platforms: all
|
|
- name: Login to DockerHub
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v4
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Login to quay
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v4
|
|
with:
|
|
registry: quay.io
|
|
username: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
password: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@master
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Cache Intel images
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
build-args: |
|
|
BASE_IMAGE=${{ matrix.base-image }}
|
|
context: .
|
|
file: ./Dockerfile
|
|
tags: quay.io/go-skynet/intel-oneapi-base:24.04
|
|
push: true
|
|
target: intel
|
|
platforms: ${{ matrix.platforms }}
|