Skip to content

Commit

Permalink
Merge pull request #1823 from GomathiselviS/divide_workflows
Browse files Browse the repository at this point in the history
Divide github workflows to maintain consistency across all repos
  • Loading branch information
GomathiselviS authored Oct 20, 2023
2 parents d1a15f8 + 3942ddd commit ad32403
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/all_green_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@ on: # yamllint disable-line rule:truthy
- '*'

jobs:
changelog-and-linters:
uses: ./.github/workflows/changelog_and_linters.yml # use the callable changelog-and-linters job to run tests
changelog:
uses: ./.github/workflows/changelog.yml # use the callable changelog job to run tests
linters:
uses: ./.github/workflows/linters.yml # use the callable linters job to run tests
sanity:
uses: ./.github/workflows/sanity.yml # use the callable sanity job to run tests
units:
uses: ./.github/workflows/units.yml # use the callable units job to run tests
all_green:
if: ${{ always() }}
needs:
- changelog-and-linters
- changelog
- linters
- sanity
- units
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.changelog-and-linters.result }}',
'${{ needs.changelog.result }}',
'${{ needs.linters.result }}',
'${{ needs.sanity.result }}',
'${{ needs.units.result }}'
]) == {'success'}"
8 changes: 8 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: changelog and linters

on: [workflow_call] # allow this workflow to be called from other workflows

jobs:
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: changelog and linters
on: [workflow_call] # allow this workflow to be called from other workflows

jobs:
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
linters:
uses: ansible-network/github_actions/.github/workflows/tox.yml@main
with:
Expand Down

0 comments on commit ad32403

Please sign in to comment.