diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 24f6835c9..c7584e559 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,6 +13,11 @@ on: - 'feat/*' - 'fix/*' - 'refactor/*' + types: + - opened + - reopened + - synchronize + - ready_for_review env: DOCKER_HUB_REPO: portainerci/portainer @@ -30,6 +35,7 @@ jobs: - { platform: windows, arch: amd64, version: 1809 } - { platform: windows, arch: amd64, version: ltsc2022 } runs-on: arc-runner-set + if: github.event.pull_request.draft == false steps: - name: '[preparation] checkout the current branch' uses: actions/checkout@v3.5.3 @@ -120,6 +126,7 @@ jobs: CONTAINER_IMAGE_TAG: ${{ env.CONTAINER_IMAGE_TAG }} build_manifests: runs-on: arc-runner-set + if: github.event.pull_request.draft == false needs: [build_images] steps: - name: '[preparation] docker login' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 28e209c23..6aceae3f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,6 +11,11 @@ on: - master - develop - release/* + types: + - opened + - reopened + - synchronize + - ready_for_review env: GO_VERSION: 1.21.5 @@ -20,6 +25,7 @@ jobs: run-linters: name: Run linters runs-on: ubuntu-latest + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/pr-security.yml b/.github/workflows/pr-security.yml index a72211570..0e9f9fdf9 100644 --- a/.github/workflows/pr-security.yml +++ b/.github/workflows/pr-security.yml @@ -23,7 +23,8 @@ jobs: runs-on: ubuntu-latest if: >- github.event.pull_request && - github.event.review.body == '/scan' + github.event.review.body == '/scan' && + github.event.pull_request.draft == false outputs: jsdiff: ${{ steps.set-diff-matrix.outputs.js_diff_result }} steps: @@ -77,7 +78,8 @@ jobs: runs-on: ubuntu-latest if: >- github.event.pull_request && - github.event.review.body == '/scan' + github.event.review.body == '/scan' && + github.event.pull_request.draft == false outputs: godiff: ${{ steps.set-diff-matrix.outputs.go_diff_result }} steps: @@ -139,7 +141,8 @@ jobs: runs-on: ubuntu-latest if: >- github.event.pull_request && - github.event.review.body == '/scan' + github.event.review.body == '/scan' && + github.event.pull_request.draft == false outputs: imagediff-trivy: ${{ steps.set-diff-trivy-matrix.outputs.image_diff_trivy_result }} imagediff-docker-scout: ${{ steps.set-diff-docker-scout-matrix.outputs.image_diff_docker_scout_result }} @@ -268,7 +271,8 @@ jobs: runs-on: ubuntu-latest if: >- github.event.pull_request && - github.event.review.body == '/scan' + github.event.review.body == '/scan' && + github.event.pull_request.draft == false strategy: matrix: jsdiff: ${{fromJson(needs.client-dependencies.outputs.jsdiff)}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7d849cd05..36400538e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,14 +1,22 @@ name: Test -on: push - env: GO_VERSION: 1.21.5 NODE_VERSION: 18.x +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + push: + jobs: test-client: runs-on: ubuntu-latest + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v2 @@ -29,6 +37,8 @@ jobs: - { platform: windows, arch: amd64, version: 1809 } - { platform: windows, arch: amd64, version: ltsc2022 } runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 diff --git a/.github/workflows/validate-openapi-spec.yaml b/.github/workflows/validate-openapi-spec.yaml index 1ec456925..758b11606 100644 --- a/.github/workflows/validate-openapi-spec.yaml +++ b/.github/workflows/validate-openapi-spec.yaml @@ -6,6 +6,11 @@ on: - master - develop - 'release/*' + types: + - opened + - reopened + - synchronize + - ready_for_review env: GO_VERSION: 1.21.5 @@ -14,6 +19,7 @@ env: jobs: openapi-spec: runs-on: ubuntu-latest + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v3