From d3389625303fca4a81d0a6df5603d054407b4ba5 Mon Sep 17 00:00:00 2001 From: manyb2ns Date: Mon, 30 Oct 2023 01:41:35 +0900 Subject: [PATCH] =?UTF-8?q?Updated=20core-service.yml=20:=20git=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=EA=B4=80=EB=A0=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/core-service.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/core-service.yml b/.github/workflows/core-service.yml index 30b03688..a1009c65 100644 --- a/.github/workflows/core-service.yml +++ b/.github/workflows/core-service.yml @@ -9,7 +9,9 @@ env: role_arn: ${{ secrets.OIDC_ROLE }} aws_region: ${{ secrets.AWS_REGION }} git_token: ${{ secrets.GIT_TOKEN }} - git_url: "https://github.com/Project-Catcher/core-service-kusto.git" + git_url: "github.com/Project-Catcher/core-service-kusto.git" + git_user: ${{ secrets.GIT_USER }} + git_email: ${{ secrets.GIT_EMAIL }} permissions: id-token: write @@ -64,21 +66,23 @@ jobs: docker tag core-service:latest ${{ env.ecr_url }}:${{ github.sha }} docker push ${{ env.ecr_url }}:${{ github.sha }} + - name: Set up Git + run: | + git config --global user.email ${{ env.GIT_EMAIL }} + git config --global user.name ${{ env.GIT_USER }} + cd ./kustomize/overlays/dev/ + git init + - name: Edit kustomize file run: | - cd ./kustomize/overlays/dev/ + git pull https://${{ env.git_user }}:${{ env.git_token }}@${{ env.git_url }} kustomize edit set image catcher-core-image=${{ env.ecr_url }}:${{ github.sha }} kustomize build . cat kustomization.yaml - - uses: actions/labeler@v4 - with: - repo-token: ${{ env.git_token }} - - name: Commit and Push files run: | - cd ~/core-runner/_work/core-service/core-service/kustomize/ - git pull ${{ env.git_url }} + cd ../.. git add . git commit -m "test commit from runner" git push origin dev \ No newline at end of file