Files
mkdocs/.github/workflows/ci.yml
T
2026-07-09 20:20:25 +03:00

41 lines
1022 B
YAML

name: Docker Build and Push
on:
push:
branches: [ main ]
env:
REGISTRY: gitea.trastinfo.ru
IMAGE_NAME: sailor/mkdocs
PLATFORMS: linux/amd64,linux/arm64
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Gitea Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push multi-arch image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max