Files
winnow/.github/workflows/docker-publish.yml
T

56 lines
1.3 KiB
YAML

name: Publish Docker Image
on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- "docs/**"
- ".github/workflows/release.yml"
- ".github/workflows/lint.yml"
- ".github/dependabot.yml"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "Disk space freed."
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the 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@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/sudolulo/if-curator-headless:latest
cache-from: type=gha
cache-to: type=gha,mode=max