mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
build(server): use github-action cache (#949)
* build(server): prune dependencies in docker builder * fix: e2e tests * refactor: dockerfile step order * fix: vips build dependency * feat: use caching
This commit is contained in:
@@ -33,6 +33,8 @@ jobs:
|
||||
file: ./server/Dockerfile
|
||||
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
altran1502/immich-server:latest
|
||||
|
||||
@@ -61,6 +63,8 @@ jobs:
|
||||
file: ./machine-learning/Dockerfile
|
||||
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
altran1502/immich-machine-learning:latest
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ jobs:
|
||||
file: ./server/Dockerfile
|
||||
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name == 'pull_request' && github.repository == 'immich-app/immich' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
altran1502/immich-server:staging
|
||||
altran1502/immich-server:${{ github.event.pull_request.number }}
|
||||
@@ -64,6 +66,8 @@ jobs:
|
||||
file: ./machine-learning/Dockerfile
|
||||
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name == 'pull_request' && github.repository == 'immich-app/immich' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
altran1502/immich-machine-learning:staging
|
||||
altran1502/immich-machine-learning:${{ github.event.pull_request.number }}
|
||||
|
||||
26
.github/workflows/build_push_server_release.yml
vendored
26
.github/workflows/build_push_server_release.yml
vendored
@@ -12,12 +12,12 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: "main"
|
||||
ref: 'main'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Get Previous tag"
|
||||
- name: 'Get Previous tag'
|
||||
id: previoustag
|
||||
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
||||
with:
|
||||
fallback: latest
|
||||
|
||||
@@ -41,6 +41,8 @@ jobs:
|
||||
file: ./server/Dockerfile
|
||||
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
altran1502/immich-server:${{ steps.previoustag.outputs.tag }}
|
||||
altran1502/immich-server:release
|
||||
@@ -52,9 +54,9 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: "Get Previous tag"
|
||||
- name: 'Get Previous tag'
|
||||
id: previoustag
|
||||
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
||||
with:
|
||||
fallback: latest
|
||||
- name: Set up QEMU
|
||||
@@ -74,6 +76,8 @@ jobs:
|
||||
file: ./machine-learning/Dockerfile
|
||||
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: |
|
||||
altran1502/immich-machine-learning:${{ steps.previoustag.outputs.tag }}
|
||||
altran1502/immich-machine-learning:release
|
||||
@@ -84,12 +88,12 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: "main"
|
||||
ref: 'main'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Get Previous tag"
|
||||
- name: 'Get Previous tag'
|
||||
id: previoustag
|
||||
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
||||
with:
|
||||
fallback: latest
|
||||
|
||||
@@ -124,12 +128,12 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: "main"
|
||||
ref: 'main'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Get Previous tag"
|
||||
- name: 'Get Previous tag'
|
||||
id: previoustag
|
||||
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
|
||||
with:
|
||||
fallback: latest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user