Spaces:
Sleeping
Sleeping
Add Docker build and push workflow
Browse files
.github/workflows/docker-build-push.yml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Docker Build and Push
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches:
|
5 |
+
- main
|
6 |
+
jobs:
|
7 |
+
build-and-push:
|
8 |
+
runs-on: ubuntu-latest
|
9 |
+
steps:
|
10 |
+
- name: Checkout code
|
11 |
+
uses: actions/checkout@v2
|
12 |
+
- name: Login to Docker Hub
|
13 |
+
uses: docker/login-action@v1
|
14 |
+
with:
|
15 |
+
username: ${{ secrets.DOCKER_USERNAME }}
|
16 |
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
17 |
+
- name: Build and push Docker image
|
18 |
+
uses: docker/build-push-action@v2
|
19 |
+
with:
|
20 |
+
context: .
|
21 |
+
file: Dockerfile
|
22 |
+
push: true
|
23 |
+
tags: ${{ secrets.DOCKER_USERNAME }}/freegpt-webui:latest
|