From 44ab6f181c56856b0bb998a0c5284df73b8cd705 Mon Sep 17 00:00:00 2001 From: Krishan <33421343+kfiven@users.noreply.github.com> Date: Wed, 30 Mar 2022 18:38:52 +0530 Subject: [PATCH] Fix docker check to only run on Dockerfile change (#452) --- .github/workflows/build-pull-request.yml | 5 ----- .github/workflows/docker-pr.yml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/docker-pr.yml diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 71c7851..d67ee15 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -32,8 +32,3 @@ jobs: name: pr.json path: pr.json retention-days: 1 - - name: Build Docker image - uses: docker/build-push-action@v2.10.0 - with: - context: . - push: false diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml new file mode 100644 index 0000000..29f41cc --- /dev/null +++ b/.github/workflows/docker-pr.yml @@ -0,0 +1,20 @@ +name: 'Docker check' + +on: + pull_request: + paths: + - 'Dockerfile' + +jobs: + docker-build: + runs-on: ubuntu-latest + env: + PR_NUMBER: ${{github.event.number}} + steps: + - name: Checkout repository + uses: actions/checkout@v3.0.0 + - name: Build Docker image + uses: docker/build-push-action@v2.10.0 + with: + context: . + push: false