Skip to content

Commit dad8512

Browse files
committed
Refactor deployment workflows: remove development workflow, update image tag handling in Docker workflow, and enhance S3 bucket configuration in Terraform
1 parent a643941 commit dad8512

File tree

5 files changed

+13
-279
lines changed

5 files changed

+13
-279
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,6 @@ jobs:
6464
--set mongo.username="${{ secrets.MONGO_USERNAME }}" \
6565
--set mongo.password="${{ secrets.MONGO_PASSWORD }}" \
6666
--set image.tag="$IMAGE_TAG"
67-
68-
# ✅ Update values.yaml for ArgoCD tracking
69-
- name: Update Helm values with new image tag
70-
run: |
71-
IMAGE_TAG=${{ inputs.image-tag || github.sha }}
72-
sed -i "s|tag: \".*\"|tag: \"$IMAGE_TAG\"|g" ./helm/values.yaml
73-
74-
- name: Commit updated image tag
75-
run: |
76-
git config --local user.email "[email protected]"
77-
git config --local user.name "GitHub Action"
78-
git add helm/values.yaml
79-
git commit -m "Update image tag to ${{ inputs.image-tag || github.sha }}" || exit 0
80-
git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
81-
8267
- name: Create Application Namespace
8368
run: |
8469
kubectl create namespace my-app-namespace --dry-run=client -o yaml | kubectl apply -f -

.github/workflows/development.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,14 @@ jobs:
110110
tags: |
111111
docker.io/${{ secrets.DOCKER_USERNAME }}/graduation-project-devops:${{ github.sha }}
112112
ghcr.io/${{ secrets.DOCKER_USERNAME }}/graduation-project-devops:${{ github.sha }}
113+
- name: Update Helm values with new image tag
114+
run: |
115+
sed -i "s|tag: \".*\"|tag: \"${{ github.sha }}\"|g" ./helm/values.yaml
116+
117+
- name: Commit updated image tag
118+
run: |
119+
git config --local user.email "[email protected]"
120+
git config --local user.name "GitHub Action"
121+
git add helm/values.yaml
122+
git commit -m "Update image tag to ${{ github.sha }}" || exit 0
123+
git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git

.github/workflows/solar-system.yml.backup

Lines changed: 0 additions & 240 deletions
This file was deleted.

backend/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ resource "aws_s3_bucket" "terraform_state" {
77
bucket = "solar-system-terraform-state-123456" # change to unique name
88
acl = "private"
99

10+
force_destroy = true
11+
1012
versioning {
1113
enabled = true
1214
}

0 commit comments

Comments
 (0)