From cbfcc64828be165fe45ce9d4facd282cebc05f4c Mon Sep 17 00:00:00 2001 From: JangAyeon <67853616+JangAyeon@users.noreply.github.com> Date: Mon, 15 Apr 2024 00:55:14 +0900 Subject: [PATCH] push docker image to GCP registery --- .github/workflows/build.yaml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 35fef05..bed8837 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,22 +21,9 @@ jobs: ## gcloud auth configure-docker us-central1-docker.pkg.dev # Configure docker to use the g cloud command-line tool as a credential helper - name: gcloud auth configure-docker - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - - # Build docker image - - name: Build docker image env: GOOGLE_PROJECT: ${{secrets.GOOGLE_PROJECT}} run: | - docker build -f Dockerfile -t us-central1-docker.pkg.dev/$GOOGLE_PROJECT/discord-study-docker:$GITHUB_SHA . - - - run: | gcloud auth configure-docker us-central1-docker.pkg.dev - - # Push docker image - - name: Push docker image - env: - GOOGLE_PROJECT: ${{secrets.GOOGLE_PROJECT}} - run: | - docker push us-central1-docker.pkg.dev/$GOOGLE_PROJECT/discord-study-docker:$GITHUB_SHA + docker build -f Dockerfile -t us-central1-docker.pkg.dev/$GOOGLE_PROJECT/discord-study-docker/discord-study-docker:$GITHUB_SHA . + docker push us-central1-docker.pkg.dev/$GOOGLE_PROJECT/discord-study-docker/discord-study-docker:$GITHUB_SHA