237 lines
8.0 KiB
YAML
237 lines
8.0 KiB
YAML
name: Run all builds
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
IMAGE_VERSION_TAG:
|
|
required: true
|
|
type: string
|
|
DOCKERHUB_USERNAME:
|
|
required: true
|
|
type: string
|
|
IMAGE_PREFIX:
|
|
required: true
|
|
type: string
|
|
PUBLISH:
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
secrets:
|
|
DATADOG_API_KEY:
|
|
required: true
|
|
DOCKERHUB_TOKEN:
|
|
required: true
|
|
|
|
jobs:
|
|
docker-build-server:
|
|
runs-on: blacksmith
|
|
name: Server
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: |
|
|
${{ inputs.IMAGE_PREFIX }}/speckle-server:${{ inputs.IMAGE_VERSION_TAG }}
|
|
# TODO add docker hub tag, but only if we want to push to docker hub
|
|
file: ./packages/server/Dockerfile
|
|
build-args: |
|
|
SPECKLE_SERVER_VERSION=${{ inputs.IMAGE_VERSION_TAG }}
|
|
|
|
docker-build-frontend2:
|
|
runs-on: blacksmith
|
|
name: Frontend2
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push w/ version tag
|
|
uses: useblacksmith/build-push-action@v1
|
|
if: ${{ inputs.PUBLISH }}
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-frontend-2:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./packages/frontend-2/Dockerfile
|
|
build-args: |
|
|
SPECKLE_SERVER_VERSION=${{ inputs.IMAGE_VERSION_TAG }}
|
|
cache-from: type=registry,ref=${{ inputs.IMAGE_PREFIX }}/speckle-frontend-2:buildcache
|
|
cache-to: type=registry,ref=${{ inputs.IMAGE_PREFIX }}/speckle-frontend-2:buildcache,mode=max
|
|
- name: Check frontend-2 build
|
|
uses: useblacksmith/build-push-action@v1
|
|
if: ${{ !inputs.PUBLISH }}
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-frontend-2:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./packages/frontend-2/Dockerfile
|
|
|
|
docker-build-preview-service:
|
|
runs-on: blacksmith
|
|
name: Preview service
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-preview-service:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./packages/preview-service/Dockerfile
|
|
|
|
docker-build-webhook-service:
|
|
runs-on: blacksmith
|
|
name: Webhook service
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-webhook-service:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./packages/webhook-service/Dockerfile
|
|
|
|
docker-build-fileimport-service:
|
|
runs-on: blacksmith
|
|
name: File import service
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-fileimport-service:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./packages/fileimport-service/Dockerfile
|
|
|
|
docker-build-test-deploy:
|
|
runs-on: blacksmith
|
|
name: Test deploy util
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-test-deployment:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./utils/test-deployment/Dockerfile
|
|
|
|
docker-build-monitor-deployment:
|
|
runs-on: blacksmith
|
|
name: monitor container
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-monitor-deployment:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./packages/monitor-deployment/Dockerfile
|
|
|
|
docker-build-docker-compose-ingress:
|
|
runs-on: blacksmith
|
|
name: Docker compose ingress
|
|
steps:
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build and push
|
|
uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
push: true
|
|
tags: ${{ inputs.IMAGE_PREFIX }}/speckle-docker-compose-ingress:${{ inputs.IMAGE_VERSION_TAG }}
|
|
file: ./utils/docker-compose-ingress/Dockerfile
|
|
|
|
docker-frontend-2-sourcemaps:
|
|
runs-on: blacksmith
|
|
name: Frontend2 sourcemaps
|
|
if: ${{ inputs.PUBLISH }}
|
|
env:
|
|
IMAGE_VERSION_TAG: ${{ inputs.IMAGE_VERSION_TAG }}
|
|
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
|
SPECKLE_SERVER_PACKAGE: frontend-2
|
|
steps:
|
|
- uses: actions/checkout@v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: useblacksmith/build-push-action@v1
|
|
with:
|
|
setup-only: true
|
|
cache-from: type=registry,ref=${{ inputs.IMAGE_PREFIX }}/speckle-frontend-2:buildcache-sourcemaps
|
|
cache-to: type=registry,ref=${{ inputs.IMAGE_PREFIX }}/speckle-frontend-2:buildcache-sourcemaps
|
|
- name: Build and Publish sourcemaps
|
|
run: ./.github/workflows/scripts/publish_fe2_sourcemaps.sh
|