Skip to content

push docker image to GCP registery #22

push docker image to GCP registery

push docker image to GCP registery #22

Workflow file for this run

name: Deploy Discord-Study
on:
push:
branches:
- "main"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: code checkout
uses: actions/checkout@v2
- name: install gcloud CLI
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{secrets.GOOGLE_PROJECT}}
service_account_key: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
export_default_credentials: true
## 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
env:
GOOGLE_PROJECT: ${{secrets.GOOGLE_PROJECT}}
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
docker build -f Dockerfile -t us-central1-docker.pkg.dev/$GOOGLE_PROJECT/discord-study-docker/discord-study-docker:latest .
docker push us-central1-docker.pkg.dev/$GOOGLE_PROJECT/discord-study-docker/discord-study-docker:latest