Skip to content

Commit

Permalink
build: use branch build for all branches
Browse files Browse the repository at this point in the history
  • Loading branch information
shanedg committed Apr 21, 2024
1 parent 1bb4a16 commit 417b412
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: GitHub Actions CI (Branch)

# TODO: FIXME: can we run on all pushes except those associated with a pull request to main (staging.yml)?

on:
pull_request:
branches: [ "main" ]
# TODO: FIXME: how to trigger on push to all branches?
push:
branches: [ "dev-pipeline" ]
branches-ignore:
- main
- 'stage/**'

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

Expand Down Expand Up @@ -40,11 +41,3 @@ jobs:
with:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
secrets: inherit

# TODO: FIXME: deploy should only run on merge to main or push to stage/** branches
deploy:
needs: [install, build, unit-test, e2e-test, lint]
uses: ./.github/workflows/deploy.yml
with:
ENVIRONMENT: ${{ vars.ENVIRONMENT }}
secrets: inherit
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: GitHub Actions CI (Main)

on:
push:
branches: [ "main" ]
branches:
- main

jobs:
main-install:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: GitHub Actions CI (Staging Deploy)

on:
pull_request:
branches:
- main
push:
branches:
- 'stage/**'
Expand Down

0 comments on commit 417b412

Please sign in to comment.