Skip to content

Build container

Build container #18

Workflow file for this run

name: Build container
on:
push:
branches: ["main"]
schedule:
- cron: "0 8 * * 5"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker setup Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata action
uses: docker/metadata-action@v5
id: meta
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest
type=sha,prefix=4.5.{{date 'YYYYMMDD'}}-
type=ref,event=branch
type=schedule,pattern=4.5.{{date 'YYYYMMDD'}}
- name: Publish images
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max