From 225108607f3ae300f966dbdc99e0d8a85bfa1517 Mon Sep 17 00:00:00 2001 From: Calvin Date: Sun, 11 Feb 2024 12:35:19 +0200 Subject: [PATCH] If Docker CI Changes, then Run the CI for Docker in PR --- .github/workflows/docker_build.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 97f530ae8a..c96bde8fee 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -7,16 +7,16 @@ on: branches: - main paths: - - "./Dockerfile" - - "./.github/workflows/docker_build.yml" + - "Dockerfile" + - ".github/workflows/docker_build.yml" pull_request: branches: - main paths: - - "./Dockerfile" - - "./.github/workflows/docker_build.yml" + - "Dockerfile" + - ".github/workflows/docker_build.yml" types: [opened, synchronize, reopened, ready_for_review, review_requested] - + workflow_dispatch: # Add this line to enable manual trigger jobs: build: @@ -25,11 +25,7 @@ jobs: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB tool-cache: false - # all of these default to true, but feel free to set to - # "false" if necessary for your workflow android: true dotnet: true haskell: true @@ -39,9 +35,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - # Conditional step for building image without pushing, for PRs - name: Build Docker Image (No Push) - # if condition is pull request or push then it will build the image if: github.event_name == 'pull_request' || github.event_name == 'push' uses: docker/build-push-action@v5.1.0 with: @@ -49,7 +43,6 @@ jobs: file: ./Dockerfile push: false - # Conditional steps for building and pushing, for pushes to main - name: Login to Docker Hub if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/login-action@v3.0.0