Skip to content

Commit

Permalink
chore: update missing cicd configs
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jul 13, 2024
1 parent 822a245 commit 3d264c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/api-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on:
branches: [ 'main' ]
paths:
- 'api-gateway/**' # API Gateway 모듈 변경
- '.github/workflows/api-gateway.yaml' # API Gateway 워크플로우 변경

env:
SPRING_PROFILE: prod
IMAGE_NAME: spinachpasta/api-gateway
MODULE_PATH: api-gateway
SERVER_PORT: 8080
GIT_ENVIRONMENT: prod (api-gateway)

concurrency:
group: api-gateway
Expand All @@ -24,6 +26,7 @@ jobs:
spring-profile: ${{ steps.setup-env.outputs.spring-profile }}
server-port: ${{ steps.setup-env.outputs.server-port }}
image-name: ${{ steps.setup-env.outputs.image-name }}
git-environment: ${{ steps.setup-env.outputs.git-environment }}
steps:
- name: GitHub 에서 레포 받아오기
uses: actions/checkout@v3
Expand All @@ -36,6 +39,7 @@ jobs:
echo "spring-profile=$SPRING_PROFILE" >> $GITHUB_OUTPUT
echo "server-port=$SERVER_PORT" >> $GITHUB_OUTPUT
echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT
echo "git-environment=$GIT_ENVIRONMENT" >> $GITHUB_OUTPUT
call-build-workflow:
if: github.event_name == 'push'
Expand Down Expand Up @@ -65,8 +69,8 @@ jobs:
argocd-repo-name: YAPP-Github/mafoo-argocd-manifest
overlay-name: ${{ needs.prepare-variables.outputs.spring-profile }}
service-name: ${{ needs.prepare-variables.outputs.module-path }}
image-name: spinachpasta/api-gateway
image-name: ${{ needs.prepare-variables.outputs.image-name }}
image-tag: ${{ needs.prepare-variables.outputs.image-tag }}
environment: ${{ needs.prepare-variables.outputs.spring-profile }}
environment: ${{ needs.prepare-variables.outputs.git-environment }}
secrets:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/argocd-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ jobs:
cat kustomization.yaml
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "deploy(${{ inputs.service-name }}): 자동배포 ${{ inputs.image-name }}"
git commit -am "release(${{ inputs.service-name }}): 자동배포 ${{ inputs.image-name }}:${{ inputs.image-tag }}"
git push -u origin main
2 changes: 1 addition & 1 deletion .github/workflows/jib-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
distribution: 'temurin'

- name: Gradle 준비하기
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3

- name: 이미지 빌드하고 푸쉬하기
id: build-image
Expand Down

0 comments on commit 3d264c3

Please sign in to comment.