github-action: build and deploy docker.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 23 May 2024 10:57:52 +0000 (19:57 +0900)
committerSangjung Woo <again4you@gmail.com>
Thu, 11 Jul 2024 09:30:38 +0000 (18:30 +0900)
Build and deploy docker image daily.
This will be deployed to nnstreamer:nnstreamer docker hub repo.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
.github/workflows/docker.yml [new file with mode: 0644]

diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
new file mode 100644 (file)
index 0000000..c4439d2
--- /dev/null
@@ -0,0 +1,28 @@
+name: Docker build and deploy
+
+on:
+  schedule:
+    # Daily at 1:15 am
+    - cron: '15 01 * * *'
+  workflow_dispatch:
+
+jobs:
+  build:
+    runs-on: ubuntu-22.04
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v4
+    - name: Login to Docker Hub
+      uses: docker/login-action@v3
+      with:
+        username: ${{ secrets.DOCKERHUB_USERNAME }}
+        password: ${{ secrets.DOCKERHUB_TOKEN }}
+    - name: Setup Docker Buildx
+      uses: docker/setup-buildx-action@v3
+    - name: Build and push
+      uses: docker/build-push-action@v5
+      with:
+        context: .
+        file: tools/docker/Dockerfile
+        push: true
+        tags: ${{ secrets.DOCKERHUB_USERNAME }}/nnstreamer:latest