Skip to content

Commit

Permalink
build: wip, reuse branch jobs for staging deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
shanedg committed Apr 21, 2024
1 parent d252835 commit 0eb619e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches-ignore:
- main
- 'stage/**'
workflow_call:
inputs:
ENVIRONMENT:
required: true
type: string

# TODO: what version of node are we getting and why? rush.json? actions default?

Expand Down
38 changes: 3 additions & 35 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,15 @@ on:
- 'stage/**'

jobs:
stage-install:
uses: ./.github/workflows/install.yml

stage-build:
needs: stage-install
uses: ./.github/workflows/build.yml

stage-lint:
needs:
- stage-install
- stage-build
uses: ./.github/workflows/lint.yml
with:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
secrets: inherit

stage-unit-test:
needs:
- stage-install
- stage-build
uses: ./.github/workflows/unit-test.yml
with:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
secrets: inherit

stage-e2e-test:
needs:
- stage-install
- stage-build
uses: ./.github/workflows/e2e-test.yml
stage-branch:
uses: ./.github/workflows/branch.yml
with:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
secrets: inherit

stage-deploy:
needs:
- stage-install
- stage-build
- stage-unit-test
- stage-e2e-test
- stage-lint
- stage-branch
uses: ./.github/workflows/deploy.yml
with:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
Expand Down

0 comments on commit 0eb619e

Please sign in to comment.