Skip to content

Commit

Permalink
chore: automate docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
hyezis committed Jun 3, 2024
1 parent 3d6816b commit 7bf4fab
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Docker Image

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-and-push-iamge:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3"

- name: Make venv
run: |
python -m venv venv
. venv/bin/activate
pip install -r requirements.txt
- name: Build & Push Docker image
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_USERNAME }}/msa-recommend .
docker push ${{ secrets.DOCKER_USERNAME }}/msa-recommend:latest

0 comments on commit 7bf4fab

Please sign in to comment.