|
@@ -1,168 +0,0 @@
|
|
|
-name: Build and Push Docker Image - Staging
|
|
|
-
|
|
|
-on:
|
|
|
- workflow_dispatch:
|
|
|
- pull_request:
|
|
|
- branches: [main]
|
|
|
-
|
|
|
-jobs:
|
|
|
- # This image include both the server and microservices - the two containers can be slitted into separated
|
|
|
- # service with its coressponding entry file.
|
|
|
- build_and_push_server_monorepo_staging:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - name: Checkout
|
|
|
- uses: actions/checkout@v3
|
|
|
- with:
|
|
|
- fetch-depth: 0
|
|
|
-
|
|
|
- - name: Set up QEMU
|
|
|
- uses: docker/setup-qemu-action@v2.1.0
|
|
|
- - name: Set up Docker Buildx
|
|
|
- id: buildx
|
|
|
- uses: docker/setup-buildx-action@v2.2.1
|
|
|
- - name: Login to Docker Hub
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
- password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
- - name: Login to GitHub Container Registry
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- registry: ghcr.io
|
|
|
- username: ${{ github.actor }}
|
|
|
- password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- - name: Build and push Immich Mono Repo
|
|
|
- uses: docker/build-push-action@v3.3.0
|
|
|
- with:
|
|
|
- context: ./server
|
|
|
- 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 }}
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-server:staging
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-server:${{ github.event.pull_request.number }}
|
|
|
-
|
|
|
- build_and_push_machine_learning_staging:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - name: Checkout
|
|
|
- uses: actions/checkout@v3
|
|
|
- with:
|
|
|
- fetch-depth: 0
|
|
|
-
|
|
|
- - name: Set up QEMU
|
|
|
- uses: docker/setup-qemu-action@v2.1.0
|
|
|
- - name: Set up Docker Buildx
|
|
|
- id: buildx
|
|
|
- uses: docker/setup-buildx-action@v2.2.1
|
|
|
- - name: Login to Docker Hub
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
- password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
- - name: Login to GitHub Container Registry
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- registry: ghcr.io
|
|
|
- username: ${{ github.actor }}
|
|
|
- password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- - name: Build and Push Machine Learning
|
|
|
- uses: docker/build-push-action@v3.3.0
|
|
|
- with:
|
|
|
- context: ./machine-learning
|
|
|
- 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 }}
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-machine-learning:staging
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-machine-learning:${{ github.event.pull_request.number }}
|
|
|
-
|
|
|
- build_and_push_web_staging:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - name: Checkout
|
|
|
- uses: actions/checkout@v3
|
|
|
- with:
|
|
|
- fetch-depth: 0
|
|
|
- - name: Set up QEMU
|
|
|
- uses: docker/setup-qemu-action@v2.1.0
|
|
|
- - name: Set up Docker Buildx
|
|
|
- id: buildx
|
|
|
- uses: docker/setup-buildx-action@v2.2.1
|
|
|
- - name: Login to Docker Hub
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
- password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
- - name: Login to GitHub Container Registry
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- registry: ghcr.io
|
|
|
- username: ${{ github.actor }}
|
|
|
- password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- - name: Build and Push Web
|
|
|
- uses: docker/build-push-action@v3.3.0
|
|
|
- with:
|
|
|
- context: ./web
|
|
|
- file: ./web/Dockerfile
|
|
|
- platforms: linux/arm/v7,linux/amd64,linux/arm64
|
|
|
- target: prod
|
|
|
- push: ${{ github.event_name == 'pull_request' && github.repository == 'immich-app/immich' }}
|
|
|
- tags: |
|
|
|
- altran1502/immich-web:staging
|
|
|
- altran1502/immich-web:${{ github.event.pull_request.number }}
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-web:staging
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-web:${{ github.event.pull_request.number }}
|
|
|
-
|
|
|
- build_and_push_nginx_staging:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - name: Checkout
|
|
|
- uses: actions/checkout@v3
|
|
|
- with:
|
|
|
- fetch-depth: 0
|
|
|
- - name: Set up QEMU
|
|
|
- uses: docker/setup-qemu-action@v2.1.0
|
|
|
- - name: Set up Docker Buildx
|
|
|
- id: buildx
|
|
|
- uses: docker/setup-buildx-action@v2.2.1
|
|
|
- - name: Login to Docker Hub
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
- password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
- - name: Login to GitHub Container Registry
|
|
|
- if: ${{ github.repository == 'immich-app/immich' }}
|
|
|
- uses: docker/login-action@v2
|
|
|
- with:
|
|
|
- registry: ghcr.io
|
|
|
- username: ${{ github.actor }}
|
|
|
- password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- - name: Build and Push Proxy
|
|
|
- uses: docker/build-push-action@v3.3.0
|
|
|
- with:
|
|
|
- context: ./nginx
|
|
|
- file: ./nginx/Dockerfile
|
|
|
- platforms: linux/arm/v7,linux/amd64,linux/arm64
|
|
|
- push: ${{ github.event_name == 'pull_request' && github.repository == 'immich-app/immich' }}
|
|
|
- tags: |
|
|
|
- altran1502/immich-proxy:staging
|
|
|
- altran1502/immich-proxy:${{ github.event.pull_request.number }}
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-proxy:staging
|
|
|
- ghcr.io/${{ github.repository_owner }}/immich-proxy:${{ github.event.pull_request.number }}
|