From 289d42b1719912281f2719036766b507963812eb Mon Sep 17 00:00:00 2001 From: Bryce Coon Date: Thu, 18 Apr 2024 10:13:51 -0600 Subject: [PATCH] adding more .yml files --- .github/workflows/backup-database.yml | 5 ++++- .github/workflows/pull-request-workflow.yml | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backup-database.yml b/.github/workflows/backup-database.yml index 20c1974..a2f378e 100644 --- a/.github/workflows/backup-database.yml +++ b/.github/workflows/backup-database.yml @@ -1,6 +1,9 @@ name: backup database on: - - workflow_dispatch + push: + branches: + - separateBranch + workflow_dispatch: jobs: backup: runs-on: self-hosted diff --git a/.github/workflows/pull-request-workflow.yml b/.github/workflows/pull-request-workflow.yml index 6c3c98b..1f48b15 100644 --- a/.github/workflows/pull-request-workflow.yml +++ b/.github/workflows/pull-request-workflow.yml @@ -2,6 +2,8 @@ name: pull request environment on: pull_request: types: [opened] + push: + branches: [separateBranch] jobs: deploy-to-kubernetes: runs-on: self-hosted @@ -11,4 +13,7 @@ jobs: - name: deploy kubernetes environment run: | export PULL_REQUEST_ID=${{ github.event.pull_request.number}} - kubectl create namespace bryce-pr-$PULL_REQUEST_ID \ No newline at end of file + kubectl create namespace bryce-pr-$PULL_REQUEST_ID || true + + kubectl -n bryce-pr-$PULL_REQUEST_ID delete configmap blazor-web-postgres-init || true + kubectl -n bryce-pr-$PULL_REQUEST_ID create configmap blazor-web-postgres-init --from-file=init.sql \ No newline at end of file