Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

build docker image every night

Gabe Kangas18e409effb9e
diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml
new file mode 100644
index 0000000000..2d7b947f13
--- /dev/null
+++ b/.github/workflows/docker-nightly.yaml
@@ -0,0 +1,17 @@
+name: Build nightly docker
+
+on:
+ schedule:
+ - cron: "0 0 * * *"
+
+jobs:
+ Docker:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Log into GitHub Container Registry
+ run: echo "${{ secrets.GH_CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
+
+ - uses: actions/checkout@v2
+ - name: Setup and run
+ run: cd build/release && ./docker-nightly.sh
\ No newline at end of file
diff --git a/build/release/docker-nightly.sh b/build/release/docker-nightly.sh
new file mode 100755
index 0000000000..69b877f734
--- /dev/null
+++ b/build/release/docker-nightly.sh
@@ -0,0 +1,19 @@
+# Docker build
+# Must authenticate first: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages
+DOCKER_IMAGE="owncast"
+VERSION="nightly"
+GIT_COMMIT=$(git rev-list -1 HEAD)
+
+echo "Building Docker image ${DOCKER_IMAGE}..."
+
+# Change to the root directory of the repository
+cd $(git rev-parse --show-toplevel)
+
+# Docker build
+docker build --build-arg NAME=docker --build-arg VERSION=${VERSION} --build-arg GIT_COMMIT=$GIT_COMMIT -t ghcr.io/owncast/${DOCKER_IMAGE}:nightly . -f build/release/Dockerfile-build
+
+# Dockerhub
+# You must be authenticated via `docker login` with your Dockerhub credentials first.
+# docker push gabekangas/owncast:nightly
+
+docker push ghcr.io/owncast/${DOCKER_IMAGE}:nightly
\ No newline at end of file