Skip to content

.github/workflows/build.yml #58

.github/workflows/build.yml

.github/workflows/build.yml #58

Workflow file for this run

on:
schedule:
- cron: "0 20 * * *"
push:
branches:
- "main"
jobs:
# As the pgvecto-rs module is needed in the Immich Postgres, a custom Bitnami Image Build is implemented.
build-postgres:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PG_MAJOR_VERSION: 16
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_READ_HQ: ${{ secrets.REGISTRY_READ_HQ }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: get vars
run: ./get_vars.sh
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and Push Versioned Docker Image
id: build-and-push
uses: docker/build-push-action@v2
with:
push: true
file: ./Dockerfile
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_IDENTIFIER }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pg${{ env.PG_MAJOR_VERSION }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BITNAMI_NAME=${{ env.BITNAMI_NAME }}
PGVECTOR_NAME=${{ env.PGVECTOR_NAME }}