Skip to content

Commit 6ade128

Browse files
committed
✏️ Improve the git event listening condition.
1 parent bebfe00 commit 6ade128

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/ci-cd.yaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,17 @@ name: CI
44
on:
55
push:
66
branches:
7-
- "develop"
8-
- "release"
97
- "master"
10-
paths-ignore:
11-
- ".gitcommitrules"
12-
- ".gitignore"
13-
- "LICENSE"
14-
- "README.md"
15-
16-
pull_request:
17-
branches:
18-
- "develop"
19-
- "release"
20-
paths-ignore:
21-
- ".gitcommitrules"
22-
- ".gitignore"
23-
- "LICENSE"
24-
- "README.md"
8+
paths:
9+
# CI/CD process of project
10+
- ".github/tag_and_release/**"
11+
- ".github/workflows/ci-cd.yaml"
12+
# Reusable GitHub Action workflows
13+
- ".github/workflows/rw_**.yaml"
2514

2615
jobs:
2716
build_git-tag_and_create_github-release:
2817
# name: Build git tag and GitHub release if it needs
29-
if: ${{ github.ref_name == 'master' && github.event_name == 'push' }}
3018
uses: ./.github/workflows/rw_build_git-tag_and_create_github-release.yaml
3119
secrets:
3220
github_auth_token: ${{ secrets.GITHUB_TOKEN }}
@@ -38,9 +26,7 @@ jobs:
3826
deploy_as_new_branch:
3927
# name: Create new git branch by the tagged commit
4028
needs: build_git-tag_and_create_github-release
41-
if: ${{ github.ref_name == 'master' &&
42-
github.event_name == 'push' &&
43-
needs.build_git-tag_and_create_github-release.outputs.github-action_reusable_workflow_release_version != 'Pre-Release' }}
29+
if: ${{ needs.build_git-tag_and_create_github-release.outputs.github-action_reusable_workflow_release_version != 'Pre-Release' }}
4430
runs-on: ubuntu-latest
4531
env:
4632
RELEASE_TYPE: ${{ needs.build_git-tag_and_create_github-release.outputs.github-action_reusable_workflow_release_version }}

0 commit comments

Comments
 (0)