Skip to content

Commit 8ada645

Browse files
Merge pull request #18 from kristiyan-velkov/develop
Develop
2 parents 4adf5f8 + f7f42c4 commit 8ada645

3 files changed

Lines changed: 47 additions & 10 deletions

File tree

.github/SECRETS_AND_VARIABLES.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,18 @@ If you want to deploy images to Docker Hub, you need these secrets:
7777

7878
**Impact if not set:**
7979

80-
- CI workflows (lint, test, build, security) will work fine
80+
- CI workflows (lint, test, build) will work fine
81+
- Security workflow will work with limitations (Docker Scout may fail)
8182
- Only CD workflow (deployment) will fail
8283
- You can skip these if you don't need to push images to Docker Hub
8384

85+
**Docker Scout Note:**
86+
87+
- Docker Scout requires authentication to work properly
88+
- The same `DOCKER_USERNAME` and `DOCKERHUB_TOKEN` are used for Scout
89+
- Without these secrets, Scout will show "not entitled" error
90+
- The workflow continues with graceful fallback (doesn't block CI)
91+
8492
---
8593

8694
## 🔐 Automatic Secrets
@@ -486,12 +494,14 @@ git push origin v1.0.0
486494
| Secret | Required | Used By | Purpose | Get From |
487495
| ------------------------ | ----------- | ------------------ | --------------------------- | ------------------- |
488496
| `GITHUB_TOKEN` | ✅ Auto | All workflows | GitHub API access | Automatic |
489-
| `DOCKER_USERNAME` | ✅ For CD | cd.yml | Docker Hub login | hub.docker.com |
490-
| `DOCKERHUB_TOKEN` | ✅ For CD | cd.yml | Docker Hub push access | hub.docker.com |
497+
| `DOCKER_USERNAME` | ✅ For CD | cd.yml, security.yml | Docker Hub login | hub.docker.com |
498+
| `DOCKERHUB_TOKEN` | ✅ For CD | cd.yml, security.yml | Docker Hub push access | hub.docker.com |
491499
| `DOCKERHUB_PROJECT_NAME` | ✅ For CD | cd.yml | Docker Hub project name | hub.docker.com |
492500
| `SNYK_TOKEN` | ⚠️ Optional | security.yml | Snyk vulnerability scanning | snyk.io |
493501
| `OPENAI_API_KEY` | ⚠️ Optional | ai-code-review.yml | AI-powered code reviews | platform.openai.com |
494502

503+
> **Note:** `DOCKER_USERNAME` and `DOCKERHUB_TOKEN` are also used by `security.yml` to authenticate Docker Scout scans.
504+
495505
---
496506

497507
## 🎯 Workflow Capabilities by Setup Level

.github/dependabot.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ updates:
77
- package-ecosystem: "npm"
88
directory: "/"
99
schedule:
10-
interval: "weekly"
10+
interval: "monthly" # Changed from weekly to monthly
1111
day: "monday"
1212
time: "09:00"
1313
timezone: "UTC"
14-
open-pull-requests-limit: 5
14+
target-branch: "develop" # Only create PRs against develop branch
15+
open-pull-requests-limit: 3 # Reduced from 5 to 3
1516
labels:
1617
- "dependencies"
1718
- "npm"
@@ -22,15 +23,24 @@ updates:
2223
include: "scope"
2324
# Group updates for better PR management
2425
groups:
26+
# Group ALL development dependencies into ONE PR
2527
development-dependencies:
2628
dependency-type: "development"
2729
update-types:
2830
- "minor"
2931
- "patch"
32+
- "major" # Include major updates too
33+
# Group ALL production dependencies into ONE PR
3034
production-dependencies:
3135
dependency-type: "production"
3236
update-types:
3337
- "patch"
38+
- "minor"
39+
# Separate group for major production updates
40+
production-major-dependencies:
41+
dependency-type: "production"
42+
update-types:
43+
- "major"
3444
# Version update strategy
3545
versioning-strategy: increase
3646
# Ignore specific packages if needed
@@ -49,19 +59,20 @@ updates:
4959
- package-ecosystem: "github-actions"
5060
directory: "/"
5161
schedule:
52-
interval: "weekly"
62+
interval: "monthly" # Changed from weekly to monthly
5363
day: "monday"
5464
time: "09:00"
5565
timezone: "UTC"
56-
open-pull-requests-limit: 3
66+
target-branch: "develop" # Only create PRs against develop branch
67+
open-pull-requests-limit: 2 # Reduced from 3 to 2
5768
labels:
5869
- "github-actions"
5970
- "dependencies"
6071
- "automated"
6172
commit-message:
6273
prefix: "ci"
6374
include: "scope"
64-
# Group GitHub Actions updates
75+
# Group ALL GitHub Actions updates into ONE PR
6576
groups:
6677
github-actions:
6778
patterns:
@@ -71,15 +82,21 @@ updates:
7182
- package-ecosystem: "docker"
7283
directory: "/"
7384
schedule:
74-
interval: "weekly"
85+
interval: "monthly" # Changed from weekly to monthly
7586
day: "monday"
7687
time: "09:00"
7788
timezone: "UTC"
78-
open-pull-requests-limit: 3
89+
target-branch: "develop" # Only create PRs against develop branch
90+
open-pull-requests-limit: 2 # Reduced from 3 to 2
7991
labels:
8092
- "docker"
8193
- "dependencies"
8294
- "automated"
8395
commit-message:
8496
prefix: "build"
8597
include: "scope"
98+
# Group all Docker updates into ONE PR
99+
groups:
100+
docker-images:
101+
patterns:
102+
- "*"

.github/workflows/security.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ jobs:
2727
- name: Set up Docker Buildx
2828
uses: docker/setup-buildx-action@v3
2929

30+
- name: Log in to Docker Hub (for Docker Scout)
31+
uses: docker/login-action@v3
32+
continue-on-error: true
33+
with:
34+
username: ${{ secrets.DOCKER_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
3037
- name: Build production image for scanning
3138
run: docker compose build react-prod
3239

@@ -137,6 +144,9 @@ jobs:
137144
name: Dependency Review
138145
runs-on: ubuntu-latest
139146
if: github.event_name == 'pull_request'
147+
permissions:
148+
contents: read
149+
pull-requests: write
140150

141151
steps:
142152
- name: Checkout code

0 commit comments

Comments
 (0)