Skip to content

Create and publish a Docker image #76

Create and publish a Docker image

Create and publish a Docker image #76

Workflow file for this run

name: Create and publish a Docker image
on:
push:
branches:
- main
schedule:
- cron: "0 12 * * 5" # every friday at noon
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ env.REGISTRY }}/hebo/chompy:latest