Improve dev branch workflow: add path filter + registry layer caching for faster builds
Build and Push (main) / build (push) Successful in 6m45s

This commit is contained in:
2026-07-30 00:22:05 +00:00
parent d0c6c84666
commit f724f8056f
+10 -1
View File
@@ -4,6 +4,11 @@ on:
push:
branches:
- dev
paths:
- '**.py'
- 'requirements.txt'
- 'Dockerfile'
- '.gitea/workflows/**'
jobs:
build:
@@ -26,7 +31,7 @@ jobs:
id: vars
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push Docker image
- name: Build and push with cache
uses: docker/build-push-action@v5
with:
context: .
@@ -35,3 +40,7 @@ jobs:
tags: |
git.sakamoto.best/lolz/auto-stars:${{ steps.vars.outputs.SHORT_SHA }}
git.sakamoto.best/lolz/auto-stars:dev
cache-from: type=registry,ref=git.sakamoto.best/lolz/auto-stars:buildcache
cache-to: type=registry,ref=git.sakamoto.best/lolz/auto-stars:buildcache,mode=max
build-args: |
BUILDKIT_INLINE_CACHE=1