Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChickenSellerRED authored Mar 11, 2024
1 parent 94a59eb commit 4d56598
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and push the docker image to DockerHub

on:
push:
branches:
- main

jobs:
push_to_registry:
name: Push the docker image to DockerHub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Fetch code from Repository API
uses: actions/checkout@v3
with:
repository: 'USC-InfoLab/w4h-api'
path: '.'

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: uscimsc/w4h:latest

0 comments on commit 4d56598

Please sign in to comment.