Skip to content

Commit

Permalink
feat: Change image tag sha to run number
Browse files Browse the repository at this point in the history
  • Loading branch information
dokdo2013 committed Jun 9, 2023
1 parent 68ad789 commit 601314e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
context: .
push: true
tags: hyeonwoo5342/music.c6h12o6.kr:${{ github.sha }}
tags: hyeonwoo5342/music.c6h12o6.kr:${{ github.run_number }}

deploy:
needs: build
Expand All @@ -44,12 +44,10 @@ jobs:
- name: Update deployment tag in GitOps repo
run: |
APP_NAME="music.c6h12o6.kr"
ls
ls gitops/apps
cd gitops/apps/${APP_NAME}
sed -i "s|image: hyeonwoo5342/${APP_NAME}:.*|image: hyeonwoo5342/${APP_NAME}:${{ github.sha }}|g" deployment.yaml
sed -i "s|image: hyeonwoo5342/${APP_NAME}:.*|image: hyeonwoo5342/${APP_NAME}:${{ github.run_number }}|g" deployment.yaml
git config user.name "dokdo2013"
git config user.email "hyeonwoo5342@gmail.com"
git add .
git commit -m "feat(${APP_NAME}): Build and deploy new commit ${{ github.sha }}"
git commit -m "feat(${APP_NAME}): Build and deploy new commit ${{ github.run_number }}"
git push

1 comment on commit 601314e

@vercel
Copy link

@vercel vercel bot commented on 601314e Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.