From 2d59bf8b144401cf662d5837f9f036ea9a20db42 Mon Sep 17 00:00:00 2001 From: minhanghuang Date: Sat, 22 Jun 2024 13:04:56 +0800 Subject: [PATCH] perf(ci): optimize part of CI and trigger on PR close --- .github/workflows/ubuntu-latest-v9.0.0-build.yaml | 4 ++-- .github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml | 4 ++-- .github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml | 7 ++----- .github/workflows/ubuntu20-v9.0.0-build.yaml | 8 ++------ .github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml | 7 ++----- .github/workflows/ubuntu22-v9.0.0-build.yaml | 7 ++----- .github/workflows/ubuntu24-v9.0.0-build.yaml | 4 ++-- 7 files changed, 14 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ubuntu-latest-v9.0.0-build.yaml b/.github/workflows/ubuntu-latest-v9.0.0-build.yaml index d935ce8..35abbca 100644 --- a/.github/workflows/ubuntu-latest-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu-latest-v9.0.0-build.yaml @@ -7,11 +7,11 @@ on: - '.github/workflows/ubuntu-latest-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 + types: [opened, synchronize, reopened, closed] jobs: build-amd-ubuntu-latest: + if: github.event.action != 'closed' runs-on: ubuntu-latest container: image: docker://ubuntu:latest diff --git a/.github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml b/.github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml index 4028583..bdf76cd 100644 --- a/.github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml @@ -7,11 +7,11 @@ on: - '.github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 + types: [opened, synchronize, reopened, closed] jobs: build-arm-ubuntu18: + if: github.event.action != 'closed' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml b/.github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml index 0185e2b..b99671f 100644 --- a/.github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml @@ -7,14 +7,11 @@ on: - '.github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 - types: - - closed + types: [opened, synchronize, reopened, closed] jobs: build-arm-ubuntu20: - if: github.event.pull_request.merged == true + if: github.event.action == 'closed' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ubuntu20-v9.0.0-build.yaml b/.github/workflows/ubuntu20-v9.0.0-build.yaml index 92ddb51..5a80ac9 100644 --- a/.github/workflows/ubuntu20-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu20-v9.0.0-build.yaml @@ -7,15 +7,11 @@ on: - '.github/workflows/ubuntu20-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 - types: - - closed - + types: [opened, synchronize, reopened, closed] jobs: build-amd-ubuntu20: - if: github.event.pull_request.merged == true + if: github.event.action == 'closed' runs-on: ubuntu-latest container: image: docker://ubuntu:20.04 diff --git a/.github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml b/.github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml index 0b1d9b9..2bc9852 100644 --- a/.github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml @@ -7,14 +7,11 @@ on: - '.github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 - types: - - closed + types: [opened, synchronize, reopened, closed] jobs: build-arm-ubuntu22: - if: github.event.pull_request.merged == true + if: github.event.action == 'closed' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ubuntu22-v9.0.0-build.yaml b/.github/workflows/ubuntu22-v9.0.0-build.yaml index 19ae73b..b1772f8 100644 --- a/.github/workflows/ubuntu22-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu22-v9.0.0-build.yaml @@ -7,14 +7,11 @@ on: - '.github/workflows/ubuntu22-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 - types: - - closed + types: [opened, synchronize, reopened, closed] jobs: build-amd-ubuntu22: - if: github.event.pull_request.merged == true + if: github.event.action == 'closed' runs-on: ubuntu-latest container: image: docker://ubuntu:22.04 diff --git a/.github/workflows/ubuntu24-v9.0.0-build.yaml b/.github/workflows/ubuntu24-v9.0.0-build.yaml index e49a080..2cd89d9 100644 --- a/.github/workflows/ubuntu24-v9.0.0-build.yaml +++ b/.github/workflows/ubuntu24-v9.0.0-build.yaml @@ -7,11 +7,11 @@ on: - '.github/workflows/ubuntu24-v9.0.0-build.yaml' pull_request: - branches: - - v9.0.0 + types: [opened, synchronize, reopened, closed] jobs: build-amd-ubuntu24: + if: github.event.action == 'closed' runs-on: ubuntu-latest container: image: docker://ubuntu:24.04