Skip to content

Build and push container to ghcr.io. #539

Build and push container to ghcr.io.

Build and push container to ghcr.io. #539

name: Build container
run-name: Build and push container to ghcr.io.
on:
workflow_dispatch:
schedule:
- cron: "0 */8 * * *"
permissions:
packages: write
jobs:
build-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Log in to the GitHub Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
pull: true
no-cache: true