Skip to content

Commit db31909

Browse files
Update .github/workflows/kustomize-ci.yaml to include feature/development branch and restore removed steps
1 parent e5b906f commit db31909

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

.github/workflows/kustomize-ci.yaml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Kustomize CI - Build and Push
33
on:
44
push:
55
branches:
6-
- feature/**
6+
- feature/development
77
- development
88

99
jobs:
@@ -38,14 +38,14 @@ jobs:
3838
username: ${{ secrets.DOCKERHUB_USERNAME }}
3939
password: ${{ secrets.DOCKERHUB_TOKEN }}
4040

41-
# - name: Build and Push Docker Image
42-
# run: |
43-
# COMMIT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
44-
# BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | tr '/' '-')
45-
# TAG="${BRANCH}-${COMMIT_SHA}"
41+
- name: Build and Push Docker Image
42+
run: |
43+
COMMIT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
44+
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | tr '/' '-')
45+
TAG="${BRANCH}-${COMMIT_SHA}"
4646
47-
# docker build -t $IMAGE_NAME:$TAG ./app
48-
# docker push $IMAGE_NAME:$TAG
47+
docker build -t $IMAGE_NAME:$TAG ./app
48+
docker push $IMAGE_NAME:$TAG
4949
- name: Checkout code
5050
uses: actions/checkout@v4
5151

@@ -88,16 +88,4 @@ jobs:
8888
git commit -m "Update image tag to $IMAGE_TAG in kustomize overlay"
8989
git push origin HEAD:feature/kustomize-update
9090
91-
# - name: Commit and push changes
92-
# run: |
93-
# git config --global user.name "${{ secrets.GIT_USER_NAME }}"
94-
# git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
95-
96-
97-
# git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git
98-
99-
# git add kustomize/overlays/dev/patch-deployment-image.yaml
100-
# git commit -m "Update latest image tag to $IMAGE_TAG" || echo "No changes to commit"
101-
# git push
102-
# env:
103-
# IMAGE_TAG: ${{ github.sha }}
91+

0 commit comments

Comments
 (0)