Skip to content

Commit

Permalink
fix: IMAGE_TAG 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
why-only-english committed Jun 13, 2024
1 parent 4663a28 commit 51721a3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: AWS ECR push & deploy k8s

on:
push:
branches: [ "main" ]
branches: [ main ]

jobs:
deploy:
Expand Down Expand Up @@ -32,12 +32,12 @@ jobs:
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: demo-frontend
IMAGE_TAG: ${{ github.run_number }}
IMAGE_TAG: ${{ steps.image.outputs.version }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "Pushing image to ECR..."
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=ecr_repository::\$ECR_REPOSITORY"
echo "::set-output name=image_tag::\$IMAGE_TAG"
docker build -t \$ECR_REGISTRY/\$ECR_REPOSITORY:\$IMAGE_TAG .
docker push \$ECR_REGISTRY/\$ECR_REPOSITORY:\$IMAGE_TAG
# kustomize 명령을 가져온다.
- name: Setup Kustomize
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Commit files
run: |
cd k8s-manifest-repo
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git config --global user.name "why-only-english"
git commit -am "Update image tag"
git push -u origin main

0 comments on commit 51721a3

Please sign in to comment.