FEATURE (docker): Build project for sending to Docker hub

This commit is contained in:
Rostislav Dugin
2025-06-08 13:58:13 +03:00
parent 6725adf22b
commit e52bd2042e
14 changed files with 217 additions and 103 deletions

36
.github/workflows/docker.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Build & push Docker image
on:
push:
branches: [main]
workflow_dispatch: {}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up QEMU (enables multi-arch emulation)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64 # both chip families
tags: |
rostislavdugin/postgresus:latest
rostislavdugin/postgresus:${{ github.sha }}