Skip to content

Commit

Permalink
perf(ci): optimize part of CI and trigger on PR close
Browse files Browse the repository at this point in the history
  • Loading branch information
minhanghuang committed Jun 22, 2024
1 parent 3b8e279 commit 2d59bf8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-latest-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu18-arrch64-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ubuntu20-arrch64-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ubuntu20-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ubuntu22-arrch64-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ubuntu22-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu24-v9.0.0-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d59bf8

Please sign in to comment.