Skip to content

Commit

Permalink
Add GitHub Actions for Publish Docker Image (#103)
Browse files Browse the repository at this point in the history
* Add GitHub Actions for publishing docker

* Change frontend env for prod

* Change image name
  • Loading branch information
devleejb authored Jan 25, 2024
1 parent 937c34f commit 58b4359
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/base-docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Base Docker Publish
on:
workflow_call:
inputs:
version:
description: version to build
required: true
type: string
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build & Push Image
env:
VERSION: ${{ inputs.version }}
run: docker build -t yorkieteam/codepair-poc:$VERSION --push ./backend
13 changes: 13 additions & 0 deletions .github/workflows/docker-publish-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: docker-publish-latest
on:
push:
branches:
- main
paths:
- "backend/**"
jobs:
call-base-docker-publish:
uses: ./.github/workflows/base-docker-publish.yml
secrets: inherit
with:
version: latest
5 changes: 3 additions & 2 deletions frontend/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VITE_YORKIE_API_ADDR='https://api.yorkie.dev'
VITE_YORKIE_API_KEY='cmggkp8ksk14av0keupg'
VITE_API_ADDR="https://codepair-api.yorkie.dev"
VITE_YORKIE_API_ADDR="https://api.yorkie.dev"
VITE_YORKIE_API_KEY="cmggkp8ksk14av0keupg"


0 comments on commit 58b4359

Please sign in to comment.