-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c04cbc6
commit 001be53
Showing
8 changed files
with
109 additions
and
12 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 |
---|---|---|
|
@@ -57,5 +57,24 @@ jobs: | |
git config --local user.email "[email protected]" | ||
git config --local user.name "githubaction" | ||
git add ${{ env.HELM_VALUE }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" | ||
git push --force origin ${{ env.HELM_BRANCH }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" || echo "No changes to commit" | ||
attempts=0 | ||
max_attempts=3 | ||
while [ $attempts -lt $max_attempts ]; do | ||
if git push --force origin ${{ env.HELM_BRANCH }}; then | ||
echo "Push successful!" | ||
break | ||
else | ||
echo "Push failed due to remote ref lock. Attempting rebase with remote branch." | ||
# 원격 브랜치 최신 상태 반영 | ||
git pull --rebase origin ${{ env.HELM_BRANCH }} | ||
attempts=$((attempts+1)) | ||
if [ $attempts -eq $max_attempts ]; then | ||
echo "Push failed after $max_attempts attempts" | ||
exit 1 | ||
fi | ||
echo "Retrying push..." | ||
fi | ||
done |
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 |
---|---|---|
|
@@ -57,5 +57,24 @@ jobs: | |
git config --local user.email "[email protected]" | ||
git config --local user.name "githubaction" | ||
git add ${{ env.HELM_VALUE }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" | ||
git push --force origin ${{ env.HELM_BRANCH }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" || echo "No changes to commit" | ||
attempts=0 | ||
max_attempts=3 | ||
while [ $attempts -lt $max_attempts ]; do | ||
if git push --force origin ${{ env.HELM_BRANCH }}; then | ||
echo "Push successful!" | ||
break | ||
else | ||
echo "Push failed due to remote ref lock. Attempting rebase with remote branch." | ||
# 원격 브랜치 최신 상태 반영 | ||
git pull --rebase origin ${{ env.HELM_BRANCH }} | ||
attempts=$((attempts+1)) | ||
if [ $attempts -eq $max_attempts ]; then | ||
echo "Push failed after $max_attempts attempts" | ||
exit 1 | ||
fi | ||
echo "Retrying push..." | ||
fi | ||
done |
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 |
---|---|---|
|
@@ -53,9 +53,29 @@ jobs: | |
|
||
- name: Commit and Push Helm Chart Changes | ||
run: | | ||
run: | | ||
cd helm-chart | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "githubaction" | ||
git add ${{ env.HELM_VALUE }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" | ||
git push --force origin ${{ env.HELM_BRANCH }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" || echo "No changes to commit" | ||
attempts=0 | ||
max_attempts=3 | ||
while [ $attempts -lt $max_attempts ]; do | ||
if git push --force origin ${{ env.HELM_BRANCH }}; then | ||
echo "Push successful!" | ||
break | ||
else | ||
echo "Push failed due to remote ref lock. Attempting rebase with remote branch." | ||
# 원격 브랜치 최신 상태 반영 | ||
git pull --rebase origin ${{ env.HELM_BRANCH }} | ||
attempts=$((attempts+1)) | ||
if [ $attempts -eq $max_attempts ]; then | ||
echo "Push failed after $max_attempts attempts" | ||
exit 1 | ||
fi | ||
echo "Retrying push..." | ||
fi | ||
done |
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 |
---|---|---|
|
@@ -57,5 +57,24 @@ jobs: | |
git config --local user.email "[email protected]" | ||
git config --local user.name "githubaction" | ||
git add ${{ env.HELM_VALUE }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" | ||
git push --force origin ${{ env.HELM_BRANCH }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" || echo "No changes to commit" | ||
attempts=0 | ||
max_attempts=3 | ||
while [ $attempts -lt $max_attempts ]; do | ||
if git push --force origin ${{ env.HELM_BRANCH }}; then | ||
echo "Push successful!" | ||
break | ||
else | ||
echo "Push failed due to remote ref lock. Attempting rebase with remote branch." | ||
# 원격 브랜치 최신 상태 반영 | ||
git pull --rebase origin ${{ env.HELM_BRANCH }} | ||
attempts=$((attempts+1)) | ||
if [ $attempts -eq $max_attempts ]; then | ||
echo "Push failed after $max_attempts attempts" | ||
exit 1 | ||
fi | ||
echo "Retrying push..." | ||
fi | ||
done |
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 |
---|---|---|
|
@@ -57,5 +57,24 @@ jobs: | |
git config --local user.email "[email protected]" | ||
git config --local user.name "githubaction" | ||
git add ${{ env.HELM_VALUE }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" | ||
git push --force origin ${{ env.HELM_BRANCH }} | ||
git commit -m "Update ${SERVICE_NAME} image tag to ${{ env.BUILD_ID }}" || echo "No changes to commit" | ||
attempts=0 | ||
max_attempts=3 | ||
while [ $attempts -lt $max_attempts ]; do | ||
if git push --force origin ${{ env.HELM_BRANCH }}; then | ||
echo "Push successful!" | ||
break | ||
else | ||
echo "Push failed due to remote ref lock. Attempting rebase with remote branch." | ||
# 원격 브랜치 최신 상태 반영 | ||
git pull --rebase origin ${{ env.HELM_BRANCH }} | ||
attempts=$((attempts+1)) | ||
if [ $attempts -eq $max_attempts ]; then | ||
echo "Push failed after $max_attempts attempts" | ||
exit 1 | ||
fi | ||
echo "Retrying push..." | ||
fi | ||
done |
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
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
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