-
Notifications
You must be signed in to change notification settings - Fork 1
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
3 changed files
with
68 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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: ArgoCD로 배포하기 | ||
on: | ||
workflow_call: | ||
inputs: | ||
argocd-repo-name: | ||
required: true | ||
type: string | ||
overlay-name: | ||
required: true | ||
type: string | ||
service-name: | ||
required: true | ||
type: string | ||
image-name: | ||
required: true | ||
type: string | ||
environment: | ||
required: true | ||
type: string | ||
image-tage: | ||
required: true | ||
type: string | ||
secrets: | ||
PAT_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: [ ubuntu-latest ] | ||
name: ArgoCD로 배포하기 | ||
|
||
environment: ${{ inputs.environment }} | ||
|
||
steps: | ||
- name: GitHub 에서 레포 받아오기 | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ inputs.argocd-repo-name }} | ||
token: ${{ secrets.PAT_TOKEN }} | ||
|
||
- name: Kustomize 설정하기 | ||
uses: imranismail/setup-kustomize@v2 | ||
|
||
- name: 이미지 태그 변경 후 배포하기 | ||
run: | | ||
cd modules/${{ inputs.service-name }}/overlays/${{ inputs.overlay-name }} | ||
kustomize edit set image ${{ inputs.image-name }}:${{ inputs.image-tag }} | ||
cat kustomization.yaml | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -am "deploy(${{ inputs.service-name }}): 자동배포 ${{ inputs.image-name }}" | ||
git push -u origin main |
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