2022-03-29 15:56:59 +02:00
|
|
|
name: Build Server - Release
|
2022-02-06 21:06:01 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2022-04-05 17:16:15 +02:00
|
|
|
release:
|
|
|
|
types: [published]
|
2022-02-06 21:06:01 +02:00
|
|
|
|
|
|
|
jobs:
|
2022-04-05 17:16:15 +02:00
|
|
|
build_and_push_server_release:
|
2022-02-06 21:06:01 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-12 00:01:58 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-02-06 21:06:01 +02:00
|
|
|
with:
|
2022-04-05 17:16:15 +02:00
|
|
|
ref: "main"
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
images: altran1502/immich-server
|
|
|
|
|
|
|
|
- name: 'Get Previous tag'
|
|
|
|
id: previoustag
|
|
|
|
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
|
|
|
with:
|
|
|
|
fallback: latest
|
|
|
|
|
2022-02-06 21:06:01 +02:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1.2.0
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-02-06 21:06:01 +02:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1.6.0
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-02-06 21:06:01 +02:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2022-04-05 17:16:15 +02:00
|
|
|
|
|
|
|
- name: Build and push immich-server release
|
2022-03-16 17:22:06 +02:00
|
|
|
uses: docker/build-push-action@v2.10.0
|
2022-02-06 21:06:01 +02:00
|
|
|
with:
|
|
|
|
context: ./server
|
|
|
|
file: ./server/Dockerfile
|
2022-02-10 04:52:38 +02:00
|
|
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
2022-04-05 17:16:15 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.previoustag.outputs.tag }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
|
|
|
build_and_push_microservice_release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: "main"
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
images: altran1502/immich-microservices
|
|
|
|
|
|
|
|
- name: 'Get Previous tag'
|
|
|
|
id: previoustag
|
|
|
|
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
|
|
|
with:
|
|
|
|
fallback: latest
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1.2.0
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1.6.0
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build and push immich-microservices release
|
|
|
|
uses: docker/build-push-action@v2.10.0
|
|
|
|
with:
|
|
|
|
context: ./microservices
|
|
|
|
file: ./microservices/Dockerfile
|
|
|
|
platforms: linux/arm/v7,linux/amd64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.previoustag.outputs.tag }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|