mirror of
https://github.com/immich-app/immich.git
synced 2024-12-22 01:47:08 +02:00
8e80825b4f
* Clean up Dockerfile and added action to build microservice latest * Combine build microservices and server into the same action * Added build and push release version for microservices
95 lines
2.6 KiB
YAML
95 lines
2.6 KiB
YAML
name: Build Server - Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build_and_push_server_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-server
|
|
|
|
- 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-server release
|
|
uses: docker/build-push-action@v2.10.0
|
|
with:
|
|
context: ./server
|
|
file: ./server/Dockerfile
|
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
|
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 }} |