Skip to content

Update docker.yml

Update docker.yml #65

Workflow file for this run

on:
push:
paths:
- Dockerfile
- .dockerignore
- firewhale/**
- uv.lock
- pyproject.toml
- README.md
- .github/workflows/docker.yml
release:
types:
- published
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-push:
name: Publish Image
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Authenticate to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Get Image Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=edge,branch=main
type=pep440,pattern={{version}}
type=pep440,pattern=v{{version}}
type=pep440,pattern={{major}}
type=pep440,pattern=v{{major}}
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max