Spaces:
Sleeping
Sleeping
Applied github action build-and-publish.
Browse files
.github/workflows/docker-image.yml
CHANGED
@@ -8,11 +8,32 @@ on:
|
|
8 |
|
9 |
jobs:
|
10 |
|
11 |
-
build:
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
runs-on: ubuntu-latest
|
14 |
|
15 |
steps:
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
jobs:
|
10 |
|
11 |
+
# build:
|
12 |
|
13 |
+
# runs-on: ubuntu-latest
|
14 |
+
|
15 |
+
# steps:
|
16 |
+
# - uses: actions/checkout@v3
|
17 |
+
# - name: Build the Docker image
|
18 |
+
# run: docker build . --file Dockerfile --tag yaleh/meta-prompt:$(date +%s)
|
19 |
+
|
20 |
+
build-and-publish:
|
21 |
runs-on: ubuntu-latest
|
22 |
|
23 |
steps:
|
24 |
+
- name: Checkout code
|
25 |
+
uses: actions/checkout@v2
|
26 |
+
|
27 |
+
- name: Login to Docker Hub
|
28 |
+
uses: docker/login-action@v1
|
29 |
+
with:
|
30 |
+
username: ${{ secrets.DOCKER_USERNAME }}
|
31 |
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
32 |
+
|
33 |
+
- name: Build and Publish Docker image
|
34 |
+
uses: docker/build-push-action@v2
|
35 |
+
with:
|
36 |
+
context: .
|
37 |
+
push: true
|
38 |
+
tags: yaleh/meta-prompt:${{ github.sha }}
|
39 |
+
|