diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 47509d90..e194b6ab 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -28,7 +28,7 @@ jobs: # If merged into main, then handle any image promotions image-promotions: name: Image Promotions - # if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' runs-on: ubuntu-22.04 strategy: matrix: diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index aca90197..012e606f 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -78,7 +78,7 @@ jobs: - name: backend triggers: ('backend/') - name: frontend - # triggers: ('frontend/') + triggers: ('frontend/') steps: - uses: actions/checkout@v4 - uses: bcgov-nr/action-builder-ghcr@v2.0.1 @@ -89,45 +89,45 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} triggers: ${{ matrix.triggers }} - # deploys: - # name: Deploys - # if: "!github.event.pull_request.head.repo.fork" - # needs: [builds] - # runs-on: ubuntu-22.04 - # strategy: - # matrix: - # name: [backend, frontend, fluentbit] - # include: - # - name: backend - # file: backend/openshift.deploy.yml - # triggers: ('common/' 'backend/' 'frontend/') - # verification_path: /actuator/health - # 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="$(( ${{ github.event.number }} % 50 ))" - # - name: fluentbit - # file: common/openshift.fluentbit.yml - # overwrite: true - # triggers: ('common/' 'backend/' 'frontend/') - # steps: - # - uses: bcgov-nr/action-deployer-openshift@v2.0.0 - # with: - # file: ${{ matrix.file }} - # oc_namespace: ${{ vars.OC_NAMESPACE }} - # oc_server: ${{ vars.OC_SERVER }} - # oc_token: ${{ secrets.OC_TOKEN }} - # overwrite: true - # parameters: - # -p ZONE=${{ github.event.number }} - # -p NAME=${{ github.event.repository.name }} - # ${{ matrix.parameters }} - # triggers: ${{ matrix.triggers }} - # verification_path: ${{ matrix.verification_path }} + deploys: + name: Deploys + if: "!github.event.pull_request.head.repo.fork" + needs: [builds] + runs-on: ubuntu-22.04 + strategy: + matrix: + name: [backend, frontend, fluentbit] + include: + - name: backend + file: backend/openshift.deploy.yml + triggers: ('common/' 'backend/' 'frontend/') + verification_path: /actuator/health + 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="$(( ${{ github.event.number }} % 50 ))" + - name: fluentbit + file: common/openshift.fluentbit.yml + overwrite: true + triggers: ('common/' 'backend/' 'frontend/') + steps: + - uses: bcgov-nr/action-deployer-openshift@v2.0.0 + with: + file: ${{ matrix.file }} + oc_namespace: ${{ vars.OC_NAMESPACE }} + oc_server: ${{ vars.OC_SERVER }} + oc_token: ${{ secrets.OC_TOKEN }} + overwrite: true + parameters: + -p ZONE=${{ github.event.number }} + -p NAME=${{ github.event.repository.name }} + ${{ matrix.parameters }} + triggers: ${{ matrix.triggers }} + verification_path: ${{ matrix.verification_path }}