Skip to content

Commit

Permalink
Shorten workflow runs
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Jan 24, 2024
1 parent e1c0109 commit af3f750
Showing 1 changed file with 38 additions and 37 deletions.
75 changes: 38 additions & 37 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,30 @@ jobs:
-p ORACLE_DB_PASSWORD='${{ secrets.DB_PASSWORD }}'
triggers: ('common/' 'backend/' 'frontend/')

builds:
name: Builds
needs: [init]
if: "!github.event.pull_request.head.repo.fork"
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
name: [backend, frontend]
include:
- name: backend
triggers: ('backend/')
- name: frontend
triggers: ('frontend/')
steps:
- uses: actions/checkout@v4
- uses: bcgov-nr/action-builder-ghcr@v2.0.1
with:
package: ${{ matrix.name }}
tag: ${{ needs.init.outputs.route }}
tag_fallback: test
token: ${{ secrets.GITHUB_TOKEN }}
triggers: ${{ matrix.triggers }}
# builds:
# name: Builds
# needs: [init]
# if: "!github.event.pull_request.head.repo.fork"
# runs-on: ubuntu-22.04
# permissions:
# packages: write
# strategy:
# matrix:
# name: [backend, frontend]
# include:
# - name: backend
# triggers: ('backend/')
# - name: frontend
# triggers: ('frontend/')
# steps:
# - uses: actions/checkout@v4
# - uses: bcgov-nr/action-builder-ghcr@v2.0.1
# with:
# package: ${{ matrix.name }}
# tag: ${{ needs.init.outputs.route }}
# tag_fallback: test
# token: ${{ secrets.GITHUB_TOKEN }}
# triggers: ${{ matrix.triggers }}

deploys:
name: Deploys
Expand All @@ -94,7 +94,8 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
name: [backend, frontend, fluentbit]
# name: [backend, frontend, fluentbit]
name: [backend]
include:
- name: backend
file: backend/openshift.deploy.yml
Expand All @@ -103,18 +104,18 @@ jobs:
parameters:
-p MIN_REPLICAS=1
-p MAX_REPLICAS=2
- name: frontend
file: frontend/openshift.deploy.yml
triggers: ('common/' 'backend/' 'frontend/')
parameters:
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p MIN_REPLICAS=1
-p MAX_REPLICAS=2
-p FAM_ROUTE=${{ needs.init.outputs.route }}
- name: fluentbit
file: common/openshift.fluentbit.yml
overwrite: true
triggers: ('common/' 'backend/' 'frontend/')
# - name: frontend
# file: frontend/openshift.deploy.yml
# triggers: ('common/' 'backend/' 'frontend/')
# parameters:
# -p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
# -p MIN_REPLICAS=1
# -p MAX_REPLICAS=2
# -p FAM_ROUTE=${{ needs.init.outputs.route }}
# - name: fluentbit
# file: common/openshift.fluentbit.yml
# overwrite: true
# triggers: ('common/' 'backend/' 'frontend/')
steps:
- uses: bcgov-nr/action-deployer-openshift@v2.0.0
with:
Expand Down

0 comments on commit af3f750

Please sign in to comment.