Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
gh-actions: merge actions
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Jul 26, 2024
1 parent 580d477 commit ab8bfd3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/push-main-backoffice.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
name: Push main
name: Push main (backoffice)

on:
push:
branches: [main]
workflow_call:

defaults:
run:
shell: bash

jobs:
lint:
name: Lint (backoffice)
uses: ./.github/workflows/lint.yml
with:
ref: ${{ github.ref }}
test:
name: Tests (backoffice)
needs: lint
uses: ./.github/workflows/test-backoffice.yml
with:
ref: ${{ github.ref }}
secrets: inherit
deploy:
name: Deploy (backoffice)
needs: test
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/push-main-workflows.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
name: Push main
name: Push main (workflows)

on:
push:
branches: [main]

defaults:
run:
shell: bash
workflow_call:

jobs:
lint:
name: Lint (workflows)
uses: ./.github/workflows/lint.yml
with:
ref: ${{ github.ref }}
test:
name: Tests (workflows)
needs: lint
uses: ./.github/workflows/test-workflows.yml
with:
ref: ${{ github.ref }}
secrets: inherit
deploy:
name: Deploy (workflows)
needs: test
runs-on: ubuntu-latest
steps:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Push main

on:
push:
branches: [main]

defaults:
run:
shell: bash

jobs:
backoffice:
uses: ./.github/workflows/push-main-backoffice.yml
workflows:
uses: ./.github/workflows/push-main-workflows.yml
success:
name: All jobs passed
runs-on: ubuntu-latest
needs: [backoffice, workflows]
steps:
- name: All jobs passed
run: echo "All jobs passed"

0 comments on commit ab8bfd3

Please sign in to comment.