-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add Dependabot Configuration with Sync to 'dependentbotchanges…
…' Branch (#11) * edit 1 * edit 2 --------- Co-authored-by: Harmanpreet Kaur <[email protected]>
- Loading branch information
1 parent
dcd93f9
commit 086f9b0
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Dependabot configuration file | ||
# For more details, refer to: https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
# GitHub Actions dependencies | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
commit-message: | ||
prefix: "build" | ||
target-branch: "dependabotchanges" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/src/backend" | ||
schedule: | ||
interval: "monthly" | ||
commit-message: | ||
prefix: "build" | ||
target-branch: "dependabotchanges" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/src/frontend" | ||
schedule: | ||
interval: "monthly" | ||
commit-message: | ||
prefix: "build" | ||
target-branch: "dependabotchanges" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Sync Main to dependabotchanges | ||
|
||
on: | ||
# Schedule the sync job to run daily or customize as needed | ||
schedule: | ||
- cron: '0 1 * * *' # Runs every day at 1 AM UTC | ||
# Trigger the sync job on pushes to the main branch | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for accurate branch comparison | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Sync main to dependabotchanges | ||
run: | | ||
# Ensure we're on the main branch | ||
git checkout main | ||
# Fetch the latest changes | ||
git pull origin main | ||
# Switch to dependabotchanges branch | ||
git checkout dependabotchanges | ||
# Merge main branch changes | ||
git merge main --no-edit | ||
# Push changes back to dependabotchanges1 branch | ||
git push origin dependabotchanges | ||
- name: Notify on Failure | ||
if: failure() | ||
run: echo "Sync from main to dependabotchanges failed!" |