From 75e81b3e4d1d0997b454434fbcbfdc36ecd48c71 Mon Sep 17 00:00:00 2001 From: Daniel Kotik Date: Thu, 6 Jun 2024 15:59:15 +0200 Subject: [PATCH] Allow CI runs for normal PRs, but avoid runs for draft PRs Closes #514 --- .github/workflows/cpu-tests.yml | 14 +++++++++----- .github/workflows/gh-pages.yml | 5 +++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cpu-tests.yml b/.github/workflows/cpu-tests.yml index b18305a23..347163ab7 100644 --- a/.github/workflows/cpu-tests.yml +++ b/.github/workflows/cpu-tests.yml @@ -5,6 +5,9 @@ on: # Trigger on pull requests to master or develop that are # marked as "ready for review" (non-draft PRs) types: + - opened + - synchronize + - reopened - ready_for_review branches: - master @@ -24,6 +27,8 @@ env: jobs: build-docker-image-cpu: + # do not trigger on draft PRs + if: ${{ ! github.event.pull_request.draft }} # Build and push temporary Docker image to GitHub's container registry runs-on: ubuntu-22.04 steps: @@ -174,14 +179,14 @@ jobs: shell: 'bash -c "docker exec -i mala-cpu bash < {0}"' run: | # Download test data repository from RODARE. If the version changes - # this URL has to be adapted (the number after /record/ and the + # this URL has to be adapted (the number after /record/ and the # version have to be incremented) wget "https://rodare.hzdr.de/record/2999/files/mala-project/test-data-1.8.0.zip" - + # Once downloaded, we have to unzip the file. The name of the root # folder in the zip file has to be updated for data repository - # updates as well - the string at the end is the hash of the data - # repository commit. + # updates as well - the string at the end is the hash of the data + # repository commit. unzip -q test-data-1.8.0.zip mv mala-project-test-data-d5694c7 mala_data @@ -247,4 +252,3 @@ jobs: - name: Push Docker image run: docker push $IMAGE_REPO/$IMAGE_NAME --all-tags - diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index cfc7a258a..17f51068b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,6 +3,9 @@ name: Documenation on: pull_request: types: + - opened + - synchronize + - reopened - ready_for_review branches: - master @@ -13,6 +16,8 @@ on: jobs: test-docstrings: + # do not trigger on draft PRs + if: ${{ ! github.event.pull_request.draft }} runs-on: ubuntu-24.04 steps: - name: Check out repository