From 656f81ca7e9fa149956131ea311c2f791c571e84 Mon Sep 17 00:00:00 2001 From: Zhixing Zhang Date: Mon, 14 Aug 2023 22:19:20 -0700 Subject: [PATCH] Update docker.yml --- .github/workflows/docker.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 074af7f..ff0643b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,8 +6,7 @@ on: env: GITHUB_SHA: ${{ github.sha }} IMAGE: images - REGISTRY_HOSTNAME: gcr.io - GCP_PROJECT: ${{ secrets.GCP_PROJECT }} + REGISTRY_HOSTNAME: ghcr.io jobs: build: name: Build @@ -15,21 +14,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - version: '270.0.0' - service_account_email: ${{ secrets.GCP_EMAIL }} - service_account_key: ${{ secrets.GCP_KEY }} - - run: | - # Set up docker to authenticate - # via gcloud command-line tool. - gcloud auth configure-docker - name: Build Docker Image run: | docker build \ - -t "$REGISTRY_HOSTNAME"/"$GCP_PROJECT"/"$IMAGE" \ + -t "$REGISTRY_HOSTNAME"/${{ github.repository_owner }}/"$IMAGE" \ --build-arg GITHUB_SHA="$GITHUB_SHA" \ --build-arg GITHUB_REF="$GITHUB_REF" . - name: Publish Docker Image run: | - docker push $REGISTRY_HOSTNAME/$GCP_PROJECT/$IMAGE + docker push "$REGISTRY_HOSTNAME"/${{ github.repository_owner }}/"$IMAGE"