Joshua Sundance Bailey
commited on
Commit
·
a21572b
1
Parent(s):
16986c0
split push flows; tag image with sha
Browse files
.github/workflows/{push.yml → docker-hub.yml}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
name:
|
2 |
|
3 |
on:
|
4 |
push:
|
@@ -14,8 +14,9 @@ jobs:
|
|
14 |
fetch-depth: 0
|
15 |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
|
16 |
|
17 |
-
- name:
|
18 |
-
|
|
|
19 |
|
20 |
- name: Log in to Docker Hub
|
21 |
uses: docker/login-action@v1
|
@@ -23,19 +24,12 @@ jobs:
|
|
23 |
username: joshuasundance
|
24 |
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
25 |
|
26 |
-
- name:
|
27 |
-
run: docker push joshuasundance/langchain-streamlit-demo:latest
|
28 |
-
|
29 |
-
push-to-huggingface:
|
30 |
-
runs-on: ubuntu-latest
|
31 |
-
steps:
|
32 |
-
- uses: actions/checkout@v2
|
33 |
-
with:
|
34 |
-
fetch-depth: 0
|
35 |
-
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
|
36 |
-
|
37 |
-
- name: Push to HuggingFace Space
|
38 |
-
env:
|
39 |
-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
40 |
run: |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Push to Docker Hub
|
2 |
|
3 |
on:
|
4 |
push:
|
|
|
14 |
fetch-depth: 0
|
15 |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
|
16 |
|
17 |
+
- name: Store SHA
|
18 |
+
id: vars
|
19 |
+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
20 |
|
21 |
- name: Log in to Docker Hub
|
22 |
uses: docker/login-action@v1
|
|
|
24 |
username: joshuasundance
|
25 |
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
26 |
|
27 |
+
- name: Build Docker image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
run: |
|
29 |
+
docker build \
|
30 |
+
-t joshuasundance/langchain-streamlit-demo:${{ steps.vars.outputs.sha_short }} \
|
31 |
+
-t joshuasundance/langchain-streamlit-demo:latest \
|
32 |
+
.
|
33 |
+
|
34 |
+
- name: Push to Docker Hub
|
35 |
+
run: docker push joshuasundance/langchain-streamlit-demo
|
.github/workflows/hf-space.yml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Push to HuggingFace Space
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [main]
|
6 |
+
workflow_dispatch:
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
push-to-huggingface:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
steps:
|
12 |
+
- uses: actions/checkout@v2
|
13 |
+
with:
|
14 |
+
fetch-depth: 0
|
15 |
+
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
|
16 |
+
|
17 |
+
- name: Push to HuggingFace Space
|
18 |
+
env:
|
19 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
20 |
+
run: |
|
21 |
+
git push https://joshuasundance:[email protected]/spaces/joshuasundance/langchain-streamlit-demo main
|