---
name: Build and Publish Most Docker Images
"on":
push:
pull_request:
schedule:
- cron: '0 6 * * *'
jobs:
build-and-push-docker-image:
name: Build Docker image and push to repositories
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
uses: docker/build-push-action@v6
with:
file: "Dockerfile"
tags: |
ghcr.io/jelmer/disperse:latest
push: ${{ github.ref == 'refs/heads/main' }}