2022-02-06 21:06:01 +02:00
|
|
|
name: Build+push Immich
|
|
|
|
|
|
|
|
on:
|
|
|
|
# Triggers the workflow on push or pull request events but only for the main branch
|
|
|
|
#schedule:
|
2022-02-07 04:31:32 +02:00
|
|
|
# * is a special character in YAML so you have to quote this string
|
|
|
|
#- cron: '0 0 * * *'
|
2022-02-06 21:06:01 +02:00
|
|
|
workflow_dispatch:
|
2022-02-07 16:55:15 +02:00
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
2022-02-06 21:06:01 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
buildandpush:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2.4.0
|
|
|
|
with:
|
2022-02-07 04:31:32 +02:00
|
|
|
ref: "main" # branch
|
2022-02-06 21:06:01 +02:00
|
|
|
# https://github.com/docker/setup-qemu-action#usage
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1.2.0
|
|
|
|
# https://github.com/marketplace/actions/docker-setup-buildx
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1.6.0
|
|
|
|
# https://github.com/docker/login-action#docker-hub
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
# https://github.com/docker/build-push-action#multi-platform-image
|
|
|
|
- name: Build and push Immich
|
|
|
|
uses: docker/build-push-action@v2.9.0
|
|
|
|
with:
|
|
|
|
context: ./server
|
|
|
|
file: ./server/Dockerfile
|
|
|
|
#platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
2022-02-07 23:52:42 +02:00
|
|
|
platforms: linux/arm/v7,linux/amd64
|
2022-02-06 21:06:01 +02:00
|
|
|
pull: true
|
|
|
|
push: true
|
|
|
|
tags: |
|
2022-02-08 00:20:21 +02:00
|
|
|
altran1502/immich-server:latest
|