-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
28 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
# 현재 시간 기준으로 태그 생성 | ||
# 현재 시간 기준으로 태그 생성 | ||
- name: Generate tag based on current time | ||
run: echo "IMAGE_TAG=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV | ||
|
||
|
@@ -35,3 +35,30 @@ jobs: | |
context: . | ||
push: true | ||
tags: ${{ secrets.AZURE_URL }}/jinni:${{ env.IMAGE_TAG }} | ||
|
||
# Kustomize 명령 가져오기 | ||
- name: Update kustomization.yaml with new image tag | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: JourneyJinni/gitops | ||
ref: main | ||
token: ${{ secrets.GIT_TOKEN }} | ||
path: gitops | ||
|
||
# 업데이트된 Kustomize 설정 적용 | ||
- name: Apply Kustomize resoureces | ||
run: | ||
pwd | ||
cd gitops/backend/base | ||
kustomize edit set image ${{ secrets.AZURE_URL }}/${{ env.IMAGE_TAG }} | ||
cat backend/base/kustomization.yaml | ||
|
||
# commit & push 설정 | ||
- name: Commit Manifest | ||
run: | ||
cd gitops/backend/base | ||
git config --global user.name 'git-actions' | ||
git config --global user.email '[email protected]' | ||
git commit -m 'Update image tag from Github Action' | ||
cat backend/base/kustomization.yaml | ||
git push origin HEAD |