Skip to content

Container Registry

Container Registry #9

Workflow file for this run

name: Container Registry
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: docker/login-action@v3
id: login
name: Setup login
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: metadata
name: Setup metadata
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest
type=ref,event=branch
- uses: docker/setup-buildx-action@v3
id: setup-buildx
name: Setup build
- uses: docker/build-push-action@v5
id: build-push
name: Build and push
with:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache