Skip to content

v2026.4.7-beta

v2026.4.7-beta #113

Workflow file for this run

name: Build Docker Images
on:
push:
# We only want to build on tags--if we include branches, we build twice.
# branches:
# - main
# - alpha
# - beta
tags:
- v*
jobs:
build:
name: Build Docker Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
# https://github.com/docker/metadata-action#tags-input
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
- name: Docker meta
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: |
photostructure/server
ghcr.io/photostructure/server
flavor: |
latest=false
# https://specs.opencontainers.org/image-spec/annotations/#pre-defined-annotation-keys
labels: |
org.opencontainers.image.title="PhotoStructure"
org.opencontainers.image.description="Your new home for all your photos and videos"
org.opencontainers.image.licenses="SEE LICENSE IN LICENSE.md"
org.opencontainers.image.url="https://photostructure.com/"
org.opencontainers.image.documentation="https://photostructure.com/server/photostructure-for-docker/"
tags: |
# always include the full semver (v1.2.3-alpha.1)
type=semver,pattern={{version}}
# minimal git SHA tag
type=sha
# tag every build as a :prealpha build
type=raw,value=prealpha
# unless this is a prealpha build, update the :alpha tag
type=raw,value=alpha,enable=${{ !contains(github.ref_name, 'prealpha') }}
# always update the beta tag unless it's an *alpha build, so people on :beta get the beta and stable builds:
type=raw,value=beta,enable=${{ !contains(github.ref_name, 'alpha') }}
# if it's not *alpha or beta, update :stable, :latest, and version tags.
type=raw,value=stable,enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
type=raw,value=latest,enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
type=semver,pattern=v{{major}},enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
type=semver,pattern=v{{major}}.{{minor}},enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
with:
platforms: arm64
- name: Set up Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}