Skip to content

Commit 5ef084c

Browse files
authored
Update cicd.yaml
hardcoded the username
1 parent b9533b3 commit 5ef084c

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

.github/workflows/cicd.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,22 @@ jobs:
2020
major_pattern: "BREAKING CHANGE"
2121
minor_pattern: "feat"
2222

23-
# --- FIX START: Create a lowercase variable for Docker ---
24-
- name: Set Lowercase Owner
25-
run: |
26-
echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
27-
# --- FIX END ---
28-
2923
- name: Print version
3024
run: echo "VERSION=${{ steps.version.outputs.version }}"
3125

26+
# --- HARDCODED FIX: Using 'roshaneanees' directly to prevent case errors ---
3227
- name: Build Docker Image
3328
run: |
3429
VERSION=${{ steps.version.outputs.version }}
3530
docker build --no-cache \
36-
-t ghcr.io/${{ env.OWNER_LC }}/devsecops-app:$VERSION \
37-
-t ghcr.io/${{ env.OWNER_LC }}/devsecops-app:latest \
31+
-t ghcr.io/roshaneanees/devsecops-app:$VERSION \
32+
-t ghcr.io/roshaneanees/devsecops-app:latest \
3833
-f app/Dockerfile app/
3934
4035
- name: Scan Image with Trivy
4136
uses: aquasecurity/trivy-action@0.20.0
4237
with:
43-
image-ref: ghcr.io/${{ env.OWNER_LC }}/devsecops-app:latest
38+
image-ref: ghcr.io/roshaneanees/devsecops-app:latest
4439
severity: CRITICAL,HIGH
4540
ignore-unfixed: true
4641
exit-code: "0"
@@ -51,8 +46,8 @@ jobs:
5146
- name: Push Images
5247
run: |
5348
VERSION=${{ steps.version.outputs.version }}
54-
docker push ghcr.io/${{ env.OWNER_LC }}/devsecops-app:$VERSION
55-
docker push ghcr.io/${{ env.OWNER_LC }}/devsecops-app:latest
49+
docker push ghcr.io/roshaneanees/devsecops-app:$VERSION
50+
docker push ghcr.io/roshaneanees/devsecops-app:latest
5651
5752
- name: Create GHCR Secret
5853
run: |
@@ -69,7 +64,7 @@ jobs:
6964
- name: Patch Deployment With Version
7065
run: |
7166
VERSION=${{ steps.version.outputs.version }}
72-
kubectl set image deployment/devsecops-app web=ghcr.io/${{ env.OWNER_LC }}/devsecops-app:$VERSION
67+
kubectl set image deployment/devsecops-app web=ghcr.io/roshaneanees/devsecops-app:$VERSION
7368
7469
- name: Wait for Rollout
7570
run: kubectl rollout status deployment/devsecops-app

0 commit comments

Comments
 (0)