Skip to content

A few changes

A few changes #20

Workflow file for this run

name: Release
on:
pull_request:
branches: [main]
release:
types: [published]
jobs:
build_and_push_proxy:
name: Build and Push Proxy
runs-on: ubuntu-latest
env:
image: immich-proxy
context: .
file: Dockerfile
strategy:
fail-fast: false
matrix:
include:
- platforms: linux/amd64,linux/arm64
permissions:
packages: write
steps:
- name : Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate docker image tags
id: metadata
uses: docker/metadata-action@v5
with:
flavor: |
# Disable latest tag
latest=false
images: |
name=ghcr.io/${{ github.repository_owner }}/${{env.image}}
tags: |
# Tag with pr-number
type=ref,event=pr,suffix=${{ matrix.suffix }}
type=ref,event=tag,suffix=${{ matrix.suffix }}
# Immich uses :release instead of :latest, let's use that too
type=raw,value=release,enable=${{ github.event_name == 'release' }},suffix=${{ matrix.suffix }}
- name: Build and push image
uses: docker/[email protected]
with:
context: ${{ env.context }}
file: ${{ env.file }}
platforms: ${{ matrix.platforms }}
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}