name: Build custom container images on: push: branches: - main workflow_dispatch: schedule: - cron: "27 3 * * 1" permissions: contents: read packages: write env: REGISTRY: git.ajpanton.se OWNER: ajp_anton PG_VERSION: "18" POSTGIS_VERSION: "3" VCHORD_VERSION: "0.5.3" PHP_VERSION: "8" jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: image: - name: postgres-custom context: postgres tags: | git.ajpanton.se/ajp_anton/postgres-custom:18 git.ajpanton.se/ajp_anton/postgres-custom:18-postgis3-vchord0.5.3 git.ajpanton.se/ajp_anton/postgres-custom:latest build_args: | PG_VERSION=18 POSTGIS_VERSION=3 VCHORD_VERSION=0.5.3 - name: php8-pgsql context: php8-pgsql tags: | git.ajpanton.se/ajp_anton/php8-pgsql:8 git.ajpanton.se/ajp_anton/php8-pgsql:8-fpm-alpine git.ajpanton.se/ajp_anton/php8-pgsql:latest build_args: | PHP_VERSION=8 - name: ai-tools-utils context: ai-tools-utils tags: | git.ajpanton.se/ajp_anton/ai-tools-utils:3 git.ajpanton.se/ajp_anton/ai-tools-utils:latest build_args: | PYTHON_VERSION=3 - name: ai-tools-utils-3.13 context: ai-tools-utils tags: | git.ajpanton.se/ajp_anton/ai-tools-utils:3.13 build_args: | PYTHON_VERSION=3.13 steps: - name: Check out repository uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to Gitea container registry run: | printf '%s' "$REGISTRY_TOKEN" | docker login "$REGISTRY" --username "$REGISTRY_USERNAME" --password-stdin - name: Build and push ${{ matrix.image.name }} uses: docker/build-push-action@v6 with: context: ./${{ matrix.image.context }} push: true tags: ${{ matrix.image.tags }} build-args: ${{ matrix.image.build_args }} pull: true