From f7bb098ba99631b357ebfb35ef205d34ee137b88 Mon Sep 17 00:00:00 2001 From: dal Date: Mon, 6 Jan 2025 12:10:42 -0700 Subject: [PATCH] Enhance GitHub Actions workflows and Dependabot configuration - Added new Dependabot configurations for npm packages in the /api and /web directories, scheduled for weekly updates with a limit of 10 open pull requests. - Updated the GitHub Actions workflows for both main and staging deployments to trigger on changes within the api directory, specifically for migrations, improving deployment reliability. These changes streamline dependency management and enhance the deployment process for the application. --- .github/dependabot.yml | 23 +++++++++++++++++++ .github/workflows/porter_app_main_3155.yml | 6 ++--- .github/workflows/porter_app_staging_3155.yml | 6 ++--- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 42deb6749..e1cdf2530 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -25,3 +25,26 @@ updates: commit-message: prefix: "chore" include: "scope" + + - package-ecosystem: "npm" + directory: "/api" + schedule: + interval: "weekly" + source-branch: "main" + target-branch: "staging" + open-pull-requests-limit: 10 + labels: + - "dependencies" + + - package-ecosystem: "npm" + directory: "/web" + schedule: + interval: "weekly" + source-branch: "main" + target-branch: "staging" + open-pull-requests-limit: 10 + labels: + - "dependencies" + commit-message: + prefix: "chore" + include: "scope" diff --git a/.github/workflows/porter_app_main_3155.yml b/.github/workflows/porter_app_main_3155.yml index 1bd27cb09..39f87dd84 100644 --- a/.github/workflows/porter_app_main_3155.yml +++ b/.github/workflows/porter_app_main_3155.yml @@ -2,13 +2,13 @@ push: branches: - main - pull_request: - branches: - - main + paths: + - api/** name: Deploy to main jobs: database-deploy: runs-on: blacksmith-16vcpu-ubuntu-2204 + if: contains(github.event.head_commit.modified_files, 'api/migrations/') || contains(github.event.head_commit.added_files, 'api/migrations/') environment: main steps: - name: Checkout code diff --git a/.github/workflows/porter_app_staging_3155.yml b/.github/workflows/porter_app_staging_3155.yml index 7424abfc8..a7ffa1db0 100644 --- a/.github/workflows/porter_app_staging_3155.yml +++ b/.github/workflows/porter_app_staging_3155.yml @@ -2,13 +2,13 @@ push: branches: - staging - pull_request: - branches: - - staging + paths: + - api/** name: Deploy to staging jobs: database-deploy: runs-on: blacksmith-16vcpu-ubuntu-2204 + if: contains(github.event.head_commit.modified_files, 'api/migrations/') || contains(github.event.head_commit.added_files, 'api/migrations/') environment: staging steps: - name: Checkout code