Skip to content

Commit da723fb

Browse files
authored
chore: update image tag when CI
1 parent ca53e27 commit da723fb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,18 @@ jobs:
3434
run: |
3535
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
3636
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
37+
38+
- name: Update deployment.yaml in infra repo
39+
env:
40+
ECR_REGISTRY: 618221165332.dkr.ecr.ap-northeast-2.amazonaws.com
41+
ECR_REPOSITORY: data-server
42+
IMAGE_TAG: ${{ github.sha }}
43+
run: |
44+
git clone https://github.com/4-wheel-drive/data-server-infra.git
45+
cd data-server-infra/manifests
46+
sed -i "s#image: .*#image: ${ECR_REGISTRY}/${ECR_REPOSITORY}:${IMAGE_TAG}#" deployment.yaml
47+
git config --global user.name "github-actions[bot]"
48+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
49+
git add deployment.yaml
50+
git commit -m "chore: update image tag to ${IMAGE_TAG}"
51+
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/4-wheel-drive/data-server-infra.git

0 commit comments

Comments
 (0)