shriarul5273
commited on
Commit
·
805fde8
1
Parent(s):
9aed6e9
added github actions
Browse files
.github/workflows/docker-image.yml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Docker Image CI
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ "main" ]
|
6 |
+
pull_request:
|
7 |
+
branches: [ "main" ]
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
|
11 |
+
build:
|
12 |
+
|
13 |
+
runs-on: ubuntu-latest
|
14 |
+
|
15 |
+
steps:
|
16 |
+
-
|
17 |
+
name: Step-1 Clone github Reop
|
18 |
+
uses: actions/checkout@v2
|
19 |
+
-
|
20 |
+
name: Step-2 Login to Docker
|
21 |
+
uses: docker/[email protected]
|
22 |
+
with :
|
23 |
+
username: ${{secrets.DOCKER_USERNAME}}
|
24 |
+
password: ${{secrets.DOCKER_PASSWORD}}
|
25 |
+
-
|
26 |
+
name: Step-3 Docker Steup
|
27 |
+
uses: docker/[email protected]
|
28 |
+
-
|
29 |
+
name: Step-4 Docker Build and push to docker hub
|
30 |
+
uses: docker/[email protected]
|
31 |
+
with :
|
32 |
+
context: .
|
33 |
+
file: ./Dockerfile
|
34 |
+
push: true
|
35 |
+
tags: ${{secrets.DOCKER_USERNAME}}/robust_rgb-d_saliency_detection:latest , ${{secrets.DOCKER_USERNAME}}/robust_rgb-d_saliency_detection:${{github.run_number}}
|
.github/workflows/huggingface.yml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Sync to Hugging Face hub
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches: [main]
|
5 |
+
|
6 |
+
# to run this workflow manually from the Actions tab
|
7 |
+
workflow_dispatch:
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
sync-to-hub:
|
11 |
+
runs-on: ubuntu-latest
|
12 |
+
steps:
|
13 |
+
- uses: actions/checkout@v2
|
14 |
+
with:
|
15 |
+
fetch-depth: 0
|
16 |
+
- name: Add remote
|
17 |
+
env:
|
18 |
+
HF: ${{secrets.HF_TOKEN }}
|
19 |
+
HFUSER: ${{secrets.DOCKER_USERNAME }}
|
20 |
+
run: git remote add space https://$HFUSER:[email protected]/spaces/$HFUSER/Robust_RGB-D_Saliency_Detection
|
21 |
+
- name: Push to hub
|
22 |
+
env:
|
23 |
+
HF: ${{ secrets.HF_TOKEN}}
|
24 |
+
HFUSER: ${{secrets.DOCKER_USERNAME }}
|
25 |
+
run: git push --force https://$HFUSER:[email protected]/spaces/$HFUSER/Robust_RGB-D_Saliency_Detection main
|