Skip to content

Build Docker Images and Publish #35

Build Docker Images and Publish

Build Docker Images and Publish #35

Workflow file for this run

name: Build Docker Images and Publish
on:
# Run on every main branch push
push:
branches: [ "main" ]
# Run every day at noon
schedule:
- cron: "0 12 * * *"
jobs:
# Deploy a new image to DockerHub
build-and-publish-dockerhub:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Build all supported container images
- name: Build Containers
run: |
docker build -t thetestgame/satisfactory:stable -f Dockerfile.Stable .
docker build -t thetestgame/satisfactory:latest -f Dockerfile.Latest .
docker build -t thetestgame/satisfactory:experimental -f Dockerfile.Experimental .
# Authenticate with DockerHub prior to publishing
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# Publish our built container images
- name: Publish Docker images to DockerHub
run: |
# Push the default tags to DockerHub
docker push thetestgame/satisfactory:stable
docker push thetestgame/satisfactory:latest
docker push thetestgame/satisfactory:experimental
# Keep the workflow alive
- uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings
# Update our DockerHub README
docker-hub-description:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: thetestgame/satisfactory