Files
taskchampion-sync-server/.github/workflows/docker.yml
Dustin J. Mitchell ab6df362bf Finish building Postgres support (#133)
This includes:
 - Building a Docker image for Postgres as well as SQLite
 - Fuller instructions for usage of the package, including the Postgres builds.

A few related things changed here:
 - `.env` is not used anymore -- the defaults in the Dockerfiles are
   sufficient
 - The Rust version in the Dockerfiles is increased to match the MSRV,
   and with it the Alpine version bumped to one built with that Rust
   version.
 - Cargo dependencies on native-tls and openssl updated to include only
   the `vendored` feature, so as not to require a system openssl
   installation.
 - Two GitHub jobs are set up, to build the two different Docker images
 - The documentation incorrectly suggested using `DELETE .. CASCADE` to
   delete clients. This syntax does not exist, as the cascading delete
   is configured in the schema.
2025-07-29 21:52:33 -04:00

73 lines
2.2 KiB
YAML

name: Build Docker
on:
push:
tags:
- '*'
jobs:
sqlite:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta-sqlite
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/gothenburgbitfactory/taskchampion-sync-server
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=match,pattern=\d.\d.\d,value=latest
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
path: "{context}/Dockerfile-sqlite"
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-sqlite.outputs.tags }}
labels: ${{ steps.meta-sqlite.outputs.labels }}
postgres:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta-postgres
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/gothenburgbitfactory/taskchampion-sync-server-postgres
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=match,pattern=\d.\d.\d,value=latest
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
path: "{context}/Dockerfile-postgres"
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-postgres.outputs.tags }}
labels: ${{ steps.meta-postgres.outputs.labels }}