mirror of
https://github.com/koush/scrypted.git
synced 2026-02-03 06:03:27 +00:00
150 lines
4.7 KiB
YAML
150 lines
4.7 KiB
YAML
name: Publish Scrypted Common
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Push Docker image to Docker Hub
|
|
runs-on: self-hosted
|
|
env:
|
|
NODE_VERSION: '22'
|
|
strategy:
|
|
matrix:
|
|
BASE: ["noble"]
|
|
FLAVOR: ["full", "lite"]
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up SSH
|
|
uses: MrSquaare/ssh-setup-action@v2
|
|
with:
|
|
host: ${{ secrets.DOCKER_SSH_HOST_AMD64 }}
|
|
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
|
|
|
|
- name: Set up SSH
|
|
uses: MrSquaare/ssh-setup-action@v2
|
|
with:
|
|
host: ${{ secrets.DOCKER_SSH_HOST_ARM64 }}
|
|
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
platforms: linux/amd64
|
|
append: |
|
|
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_AMD64 }}
|
|
platforms: linux/amd64
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
platforms: linux/arm64
|
|
append: |
|
|
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_ARM64 }}
|
|
platforms: linux/arm64
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Login to Github Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image (scrypted-common)
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
build-args: |
|
|
NODE_VERSION=${{ env.NODE_VERSION }}
|
|
BASE=${{ matrix.BASE }}
|
|
context: install/docker/
|
|
file: install/docker/Dockerfile.${{ matrix.FLAVOR }}
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
koush/scrypted-common:${{ matrix.BASE }}-${{ matrix.FLAVOR }}
|
|
ghcr.io/koush/scrypted-common:${{ matrix.BASE }}-${{ matrix.FLAVOR }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
build-vendor:
|
|
name: Push Vendor Docker image to Docker Hub
|
|
needs: build
|
|
runs-on: self-hosted
|
|
strategy:
|
|
matrix:
|
|
BASE: ["noble"]
|
|
VENDOR: ["nvidia", "nvidia-legacy", "intel", "amd"]
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up SSH
|
|
uses: MrSquaare/ssh-setup-action@v2
|
|
with:
|
|
host: ${{ secrets.DOCKER_SSH_HOST_AMD64 }}
|
|
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
|
|
|
|
- name: Set up SSH
|
|
uses: MrSquaare/ssh-setup-action@v2
|
|
with:
|
|
host: ${{ secrets.DOCKER_SSH_HOST_ARM64 }}
|
|
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
platforms: linux/amd64
|
|
append: |
|
|
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_AMD64 }}
|
|
platforms: linux/amd64
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
platforms: linux/arm64
|
|
append: |
|
|
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_ARM64 }}
|
|
platforms: linux/arm64
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Login to Github Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image (scrypted-common)
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
build-args: |
|
|
BASE=ghcr.io/koush/scrypted-common:${{ matrix.BASE }}-full
|
|
context: install/docker/
|
|
file: install/docker/Dockerfile.${{ matrix.VENDOR }}
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
koush/scrypted-common:${{ matrix.BASE }}-${{ matrix.VENDOR }}
|
|
ghcr.io/koush/scrypted-common:${{ matrix.BASE }}-${{ matrix.VENDOR }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|