From 3dd828d70394fe3fb2b99d62a3ec5a0394b25b98 Mon Sep 17 00:00:00 2001 From: ibuler Date: Sat, 14 Sep 2024 15:27:17 +0800 Subject: [PATCH] perf: workflow build base image --- .github/workflows/build-base-image.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-base-image.yml b/.github/workflows/build-base-image.yml index 0c3750575..087336688 100644 --- a/.github/workflows/build-base-image.yml +++ b/.github/workflows/build-base-image.yml @@ -4,10 +4,6 @@ on: push: branches: - 'pr*' - paths: - - 'poetry.lock' - - 'pyproject.toml' - - 'Dockerfile-base' jobs: build-and-push: @@ -17,6 +13,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Check for changes + run: | + if git diff --name-only HEAD^ dev | grep -E 'poetry.lock|pyproject.toml|Dockerfile-base|package.json|go.mod|yarn.lock|pom.xml|install_deps.sh'; then + echo "Changes detected, proceeding with the job." + else + echo "No relevant changes detected, exiting." + exit 0 + fi + - name: Set up QEMU uses: docker/setup-qemu-action@v3