Skip to content

Commit

Permalink
testing 12
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonSmith committed Jun 13, 2024
1 parent 925ba13 commit 722a535
Showing 1 changed file with 32 additions and 54 deletions.
86 changes: 32 additions & 54 deletions .github/workflows/docker_push_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,8 @@ jobs:
env:
KEY: ${{ secrets.GCP_SA_KEY }}

- name: Checkout code
uses: actions/checkout@v2

# Deploy the image to Cloud Run
- name: Deploy to Cloud Run
run: |
gcloud run deploy ${{ env.IMAGE_NAME }} \
--project=minimap-v0 \
--image=${{ steps.meta.outputs.tags }} \
--platform=managed \
--region=us-central1 \
--allow-unauthenticated \
--update-env-vars=DATABASE_URL=${{ secrets.DATABASE_URL }},COHERE_API_KEY=${{ secrets.COHERE_API_KEY }} \
--memory=4Gi \
--cpu=4 \
--max-instances=1
# - name: Checkout code
# uses: actions/checkout@v2

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
Expand Down Expand Up @@ -105,45 +84,44 @@ jobs:
# - name: Checkout repository
# uses: actions/checkout@v2

# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v3
# with:
# images: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}

# - name: Build Docker image
# run: |
# docker build -t ${{ env.IMAGE_NAME }} -f ./src/backend/Dockerfile .

# # - name: Pull docker hello-world image
# # run: docker pull hello-world
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}

# # - name: Tag Docker image
# # run: |
# # docker tag hello-world ${{ vars.REGISTRY }}/hello-world
- name: Build Docker image
run: |
docker build -t ${{ env.IMAGE_NAME }} -f ./src/backend/Dockerfile .
# # # Save the SA key to a file so that it can be used by the docker build
# # - name: Save SA key to file
# # run: echo "${{ secrets.GCP_SA_KEY }}" > /tmp/gcp_sa_key.json
# - name: Pull docker hello-world image
# run: docker pull hello-world

# # - name: Try auth again!
# # run: |
# # gcloud auth activate-service-account --key-file /tmp/gcp_sa_key.json
# # gcloud auth configure-docker --quiet
# # docker login -u _json_key -p "$(cat /tmp/gcp_sa_key.json)" https://gcr.io
# - name: Tag Docker image
# run: |
# docker tag hello-world ${{ vars.REGISTRY }}/hello-world

# # - name: Push Docker image
# # run: |
# # docker push ${{ vars.REGISTRY }}/hello-world
# # Save the SA key to a file so that it can be used by the docker build
# - name: Save SA key to file
# run: echo "${{ secrets.GCP_SA_KEY }}" > /tmp/gcp_sa_key.json

# - name: Tag Docker image
# - name: Try auth again!
# run: |
# docker tag ${{ env.IMAGE_NAME }} ${{ steps.meta.outputs.tags }}
# gcloud auth activate-service-account --key-file /tmp/gcp_sa_key.json
# gcloud auth configure-docker --quiet
# docker login -u _json_key -p "$(cat /tmp/gcp_sa_key.json)" https://gcr.io

# - name: Push Docker image
# env:
# THE_TAGS: ${{ steps.meta.outputs.tags }}
# run: |
# docker push ${{ steps.meta.outputs.tags }}
# docker push ${{ vars.REGISTRY }}/hello-world

- name: Tag Docker image
run: |
docker tag ${{ env.IMAGE_NAME }} ${{ steps.meta.outputs.tags }}
- name: Push Docker image
env:
THE_TAGS: ${{ steps.meta.outputs.tags }}
run: |
docker push ${{ steps.meta.outputs.tags }}

0 comments on commit 722a535

Please sign in to comment.