2022-04-05 18:43:09 +02:00
|
|
|
name: Build and push Docker image - 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-06-12 00:47:01 +02:00
|
|
|
build_and_push_server_monorepo_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-11-10 03:53:21 +02:00
|
|
|
ref: 'main'
|
2022-04-05 17:16:15 +02:00
|
|
|
fetch-depth: 0
|
2022-05-21 09:23:55 +02:00
|
|
|
|
2022-11-10 03:53:21 +02:00
|
|
|
- name: 'Get Previous tag'
|
2022-04-05 17:16:15 +02:00
|
|
|
id: previoustag
|
2022-11-10 03:53:21 +02:00
|
|
|
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
2022-04-05 17:16:15 +02:00
|
|
|
with:
|
2022-05-21 09:23:55 +02:00
|
|
|
fallback: latest
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-02-06 21:06:01 +02:00
|
|
|
- name: Set up QEMU
|
2022-10-13 12:55:56 +02:00
|
|
|
uses: docker/setup-qemu-action@v2.1.0
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-02-06 21:06:01 +02:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-10-18 12:45:12 +02:00
|
|
|
uses: docker/setup-buildx-action@v2.2.1
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-02-06 21:06:01 +02:00
|
|
|
- name: Login to Docker Hub
|
2022-05-06 14:21:11 +02:00
|
|
|
uses: docker/login-action@v2
|
2022-02-06 21:06:01 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-11-13 16:32:50 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2022-04-05 17:16:15 +02:00
|
|
|
- name: Build and push immich-server release
|
2022-10-12 12:47:08 +02:00
|
|
|
uses: docker/build-push-action@v3.2.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' }}
|
2022-11-10 03:53:21 +02:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|
2022-04-05 18:43:09 +02:00
|
|
|
tags: |
|
|
|
|
altran1502/immich-server:${{ steps.previoustag.outputs.tag }}
|
2022-06-30 04:24:55 +02:00
|
|
|
altran1502/immich-server:release
|
2022-11-13 16:32:50 +02:00
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-server:${{ steps.previoustag.outputs.tag }}
|
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-server:release
|
2022-04-05 17:16:15 +02:00
|
|
|
|
2022-06-12 00:47:01 +02:00
|
|
|
build_and_push_machine_learning_release:
|
2022-04-05 17:16:15 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-11-10 03:53:21 +02:00
|
|
|
- name: 'Get Previous tag'
|
2022-04-05 17:16:15 +02:00
|
|
|
id: previoustag
|
2022-11-10 03:53:21 +02:00
|
|
|
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
2022-04-05 17:16:15 +02:00
|
|
|
with:
|
2022-05-21 09:23:55 +02:00
|
|
|
fallback: latest
|
2022-04-05 17:16:15 +02:00
|
|
|
- name: Set up QEMU
|
2022-10-13 12:55:56 +02:00
|
|
|
uses: docker/setup-qemu-action@v2.1.0
|
2022-04-05 17:16:15 +02:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-10-18 12:45:12 +02:00
|
|
|
uses: docker/setup-buildx-action@v2.2.1
|
2022-04-05 17:16:15 +02:00
|
|
|
- name: Login to Docker Hub
|
2022-05-06 14:21:11 +02:00
|
|
|
uses: docker/login-action@v2
|
2022-04-05 17:16:15 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2022-11-13 16:32:50 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2022-06-12 00:47:01 +02:00
|
|
|
- name: Build and Push Machine Learning
|
2022-10-12 12:47:08 +02:00
|
|
|
uses: docker/build-push-action@v3.2.0
|
2022-04-05 17:16:15 +02:00
|
|
|
with:
|
2022-06-12 00:47:01 +02:00
|
|
|
context: ./machine-learning
|
|
|
|
file: ./machine-learning/Dockerfile
|
2022-07-23 21:15:55 +02:00
|
|
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
2022-06-12 00:47:01 +02:00
|
|
|
push: true
|
2022-11-10 03:53:21 +02:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|
2022-04-05 18:43:09 +02:00
|
|
|
tags: |
|
2022-06-12 00:47:01 +02:00
|
|
|
altran1502/immich-machine-learning:${{ steps.previoustag.outputs.tag }}
|
2022-06-30 04:24:55 +02:00
|
|
|
altran1502/immich-machine-learning:release
|
2022-11-13 16:32:50 +02:00
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-machine-learning:${{ steps.previoustag.outputs.tag }}
|
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-machine-learning:release
|
2022-05-21 09:23:55 +02:00
|
|
|
|
|
|
|
build_and_push_web_release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2022-11-10 03:53:21 +02:00
|
|
|
ref: 'main'
|
2022-05-21 09:23:55 +02:00
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-11-10 03:53:21 +02:00
|
|
|
- name: 'Get Previous tag'
|
2022-05-21 09:23:55 +02:00
|
|
|
id: previoustag
|
2022-11-10 03:53:21 +02:00
|
|
|
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
2022-05-21 09:23:55 +02:00
|
|
|
with:
|
|
|
|
fallback: latest
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2022-10-13 12:55:56 +02:00
|
|
|
uses: docker/setup-qemu-action@v2.1.0
|
2022-05-21 09:23:55 +02:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-10-18 12:45:12 +02:00
|
|
|
uses: docker/setup-buildx-action@v2.2.1
|
2022-05-21 09:23:55 +02:00
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2022-11-13 16:32:50 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2022-05-21 09:23:55 +02:00
|
|
|
- name: Build and push immich-web release
|
2022-10-12 12:47:08 +02:00
|
|
|
uses: docker/build-push-action@v3.2.0
|
2022-05-21 09:23:55 +02:00
|
|
|
with:
|
|
|
|
context: ./web
|
|
|
|
file: ./web/Dockerfile
|
|
|
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
target: prod
|
|
|
|
tags: |
|
|
|
|
altran1502/immich-web:${{ steps.previoustag.outputs.tag }}
|
2022-06-30 04:24:55 +02:00
|
|
|
altran1502/immich-web:release
|
2022-11-13 16:32:50 +02:00
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-web:${{ steps.previoustag.outputs.tag }}
|
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-web:release
|
2022-06-30 04:24:55 +02:00
|
|
|
|
|
|
|
build_and_push_nginx_release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2022-11-10 03:53:21 +02:00
|
|
|
ref: 'main'
|
2022-06-30 04:24:55 +02:00
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-11-10 03:53:21 +02:00
|
|
|
- name: 'Get Previous tag'
|
2022-06-30 04:24:55 +02:00
|
|
|
id: previoustag
|
2022-11-10 03:53:21 +02:00
|
|
|
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
2022-06-30 04:24:55 +02:00
|
|
|
with:
|
|
|
|
fallback: latest
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2022-10-13 12:55:56 +02:00
|
|
|
uses: docker/setup-qemu-action@v2.1.0
|
2022-06-30 04:24:55 +02:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-10-18 12:45:12 +02:00
|
|
|
uses: docker/setup-buildx-action@v2.2.1
|
2022-06-30 04:24:55 +02:00
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2022-11-13 16:32:50 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2022-06-30 04:24:55 +02:00
|
|
|
- name: Build and push immich-proxy release
|
2022-10-12 12:47:08 +02:00
|
|
|
uses: docker/build-push-action@v3.2.0
|
2022-06-30 04:24:55 +02:00
|
|
|
with:
|
2022-06-30 07:10:01 +02:00
|
|
|
context: ./nginx
|
|
|
|
file: ./nginx/Dockerfile
|
2022-06-30 04:24:55 +02:00
|
|
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: |
|
|
|
|
altran1502/immich-proxy:release
|
|
|
|
altran1502/immich-proxy:${{ steps.previoustag.outputs.tag }}
|
2022-11-13 16:32:50 +02:00
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-proxy:${{ steps.previoustag.outputs.tag }}
|
|
|
|
ghcr.io/${{ github.repository_owner }}/immich-proxy:release
|