Add nightly build action that uses Earthly. Another step in #1953

This commit is contained in:
Gabe Kangas
2022-06-18 20:23:23 -07:00
parent d214f2390e
commit fce3672bc1
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/sh
# 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-earthly"
DATE=$(date +"%Y%m%d")
VERSION="${DATE}-nightly"
echo "Building Docker image ${DOCKER_IMAGE}..."
earthly --ci --push +docker --image="ghcr.io/owncast/${DOCKER_IMAGE}" --tag=nightly --version=${VERSION}
# docker push ghcr.io/owncast/${DOCKER_IMAGE}:nightly