Closed fpiesche closed 2 years ago
Looks good to me, thank you!
Regarding the push to Docker Hub, technically automatic builds are already enabled on there, so it will build a new image on changes to this repo and the base image, but it's not like it hurts to push them here as well and have ghcr.io as an alternative.
This change is twofold:
dependabot.yml
to make GitHub's Dependabot automatically update the base image in the Dockerfile when a new version becomes availablemaster
, push) a new Docker image for the server, tagged both aslatest
and with a semver-compatible date stamp.For the CI workflow to function, the repository will need three secrets set:
DOCKERHUB_USERNAME
for the user/org name to push the image tohub.docker.com
under (i.e.didstopia
in this case)DOCKERHUB_TOKEN
as a PAT to your Docker Hub account so that the image can be pushedGHCR_TOKEN
as a PAT to your GitHub account with thedelete:packages
,repo
andwrite:packages
scopes so the image can also be pushed to the GitHub container registry. I've added this as Docker Hub has started introducing restrictions, and pushing the image to GHCR as well as Docker Hub is no extra effort while making the image more widely available.I'm using this workflow with minimal changes widely across my own Docker image repositories, hence the configurability - you'll notice some commented-out steps and variables that would allow building of multi-arch images which don't apply here since Steam and Starbound are only available on x86, but I'm e.g. using the workflow in its full form to build multi-arch ioquake3 server images.