food-market/.github/workflows/docker.yml
nurdotnet 8ac9e04bcf ci(docker): drop setup-buildx-action — use system buildx on self-hosted
docker/setup-buildx-action pulls the buildx binary from
release-assets.githubusercontent.com, which is unreachable from our
network (TLS handshake never completes — SNI-level block from upstream,
same host works for objects.githubusercontent.com). The self-hosted
runner already has docker-buildx 0.30.1 installed via apt, so
build-push-action can use it directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:44:11 +05:00

69 lines
1.8 KiB
YAML

name: Docker Images
on:
push:
branches: [main]
paths:
- 'src/food-market.api/**'
- 'src/food-market.web/**'
- 'src/food-market.application/**'
- 'src/food-market.domain/**'
- 'src/food-market.infrastructure/**'
- 'src/food-market.shared/**'
- 'deploy/**'
- '.github/workflows/docker.yml'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
api:
name: API image
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build + push
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile.api
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/food-market-api:latest
ghcr.io/${{ github.repository_owner }}/food-market-api:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
web:
name: Web image
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build + push
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile.web
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/food-market-web:latest
ghcr.io/${{ github.repository_owner }}/food-market-web:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max