Skip to content

Commit

Permalink
cd: docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
RyushiAok committed Nov 2, 2023
1 parent 77ca0ae commit 2b0cf64
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
- cd/**
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
environment:
name: production
url: https://google.com

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Google Artifact Registry
uses: docker/login-action@v1
with:
registry: asia-northeast1-docker.pkg.dev
username: _json_key
password: ${{ secrets.GCP_SA_KEY }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./server/src
push: true
tags: ${{ secrets.DOCKER_IMAGE_NAME }}:latest

0 comments on commit 2b0cf64

Please sign in to comment.