Skip to content

Commit

Permalink
💚 main only push ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlutermade committed Sep 17, 2023
1 parent 1431cd7 commit 7c1ab03
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: 👷CI
name: 👷 Main

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
branches: [main]

jobs:
check_main_branch:
runs-on: ubuntu-latest
steps:
- name: Check if it comes from the main branch
id: main_branch_check
run: echo "is_main=${{ github.ref == 'refs/heads/main' }}" >> $GITHUB_OUTPUT

check_lint:
needs: check_main_branch
if: needs.check_main_branch.outputs.is_main == true
uses: ./.github/workflows/checkLint.yml
secrets: inherit

check_type:
needs: check_main_branch
if: needs.check_main_branch.outputs.is_main == true
uses: ./.github/workflows/checkType.yml
secrets: inherit

unit_test:
needs: check_main_branch
if: needs.check_main_branch.outputs.is_main == true
uses: ./.github/workflows/unitTest.yml
secrets: inherit

ready_to_review:
needs: [check_lint, check_type, unit_test]
uses: ./.github/workflows/readyToReview.yml
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/pullRequset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 👷 Pull Requset CI

on:
pull_request:
types: [opened, synchronize]

jobs:
check_lint:
uses: ./.github/workflows/checkLint.yml
secrets: inherit

check_type:
uses: ./.github/workflows/checkType.yml
secrets: inherit

unit_test:
uses: ./.github/workflows/unitTest.yml
secrets: inherit

ready_to_review:
needs: [check_lint, check_type, unit_test]
uses: ./.github/workflows/readyToReview.yml
secrets: inherit

0 comments on commit 7c1ab03

Please sign in to comment.