From 1fbbbafc2afed15b7d56ff0d25396387008697ff Mon Sep 17 00:00:00 2001 From: Donghyeon Im Date: Thu, 25 Apr 2024 15:57:00 +0900 Subject: [PATCH] refactor(auth): test cicd --- .github/workflows/aws.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aws.yaml b/.github/workflows/aws.yaml index f793a6c..66c7eed 100644 --- a/.github/workflows/aws.yaml +++ b/.github/workflows/aws.yaml @@ -28,12 +28,12 @@ jobs: - name: Determine ECR Repository id: ecr_repo run: | - REPO_NAME=$(echo ${{ github.repository }} | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]') + REPO_NAME=$(echo ${{ github.repository }} | awk -F '/' '{print $2}' | tr '[:upper:]' '[:lower:]') if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then - echo "{repo}={${REPO_NAME}_prod}" >> $GITHUB_OUTPUT + echo "repo=${REPO_NAME}_prod" >> $GITHUB_OUTPUT elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/feat/cicd" ]]; then - echo "{repo}={${REPO_NAME}_stag}" >> $GITHUB_OUTPUT + echo "repo=${REPO_NAME}_stag" >> $GITHUB_OUTPUT else echo "::error::Unsupported event or branch: ${{ github.event_name }} on ${{ github.ref }}" exit 1 @@ -46,4 +46,4 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: | docker build -t ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ steps.ecr_repo.outputs.repo }}:${{ github.sha }} . - docker push ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ steps.ecr_repo.outputs.repo }}:${{ github.sha }} + docker push ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ steps.ecr_repo.outputs.repo }}:${{ github.sha }} \ No newline at end of file