Skip to content

Build Docker Image

Build Docker Image #5

Workflow file for this run

name: "Build Docker Image"
on:
push:
branches:
- master
schedule:
- cron: "0 9 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check if Base Image Updated
id: image_update_check
if: github.event_name == 'schedule'
uses: lucacome/[email protected]
with:
base-image: "ubuntu:latest"
image: "realies/soulseek:latest"
- name: Set up Docker Buildx
if: github.event_name == 'push' || steps.image_update_check.outputs.needs-updating == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name == 'push' || steps.image_update_check.outputs.needs-updating == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
if: github.event_name == 'push' || steps.image_update_check.outputs.needs-updating == 'true'
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: realies/soulseek:latest
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64
- name: Docker Image Digest
if: steps.image_update_check.outputs.needs-updating == 'true'
run: echo ${{ steps.docker_build.outputs.digest }}