Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 5 additions & 59 deletions .github/workflows/apps-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,62 +20,8 @@ on:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

strategy:
matrix:
platform: [linux/amd64]

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Check if Docker Hub secrets are available
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV
else
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
uses: docker/login-action@v3
if: env.DOCKERHUB_LOGIN == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ctrlplane/api
tags: |
type=sha,format=short,prefix=

- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
push: false
file: apps/api/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main' && env.DOCKERHUB_LOGIN == 'true'
with:
push: true
file: apps/api/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/api
dockerfile: apps/api/Dockerfile
71 changes: 6 additions & 65 deletions .github/workflows/apps-relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,68 +48,9 @@ jobs:
run: go test -race ./...

build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

strategy:
matrix:
platform: [linux/amd64]

defaults:
run:
working-directory: apps/relay

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Check if Docker Hub secrets are available
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV
else
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
uses: docker/login-action@v3
if: env.DOCKERHUB_LOGIN == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ctrlplane/relay
tags: |
type=sha,format=short,prefix=

- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
context: apps/relay
push: false
file: apps/relay/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main' && env.DOCKERHUB_LOGIN == 'true'
with:
context: apps/relay
push: true
file: apps/relay/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/relay
dockerfile: apps/relay/Dockerfile
context: apps/relay
79 changes: 6 additions & 73 deletions .github/workflows/apps-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,77 +14,10 @@ on:
- "packages/**"
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/web

jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

strategy:
matrix:
platform: [linux/amd64]

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Check if Docker Hub secrets are available
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV
else
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
fi

- name: Log in to Container Registry
uses: docker/login-action@v3
if: env.DOCKERHUB_LOGIN == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ctrlplane/web
tags: |
type=sha,format=short,prefix=

- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
push: false
file: apps/web/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main' && env.DOCKERHUB_LOGIN == 'true'
with:
push: true
file: apps/web/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}

- name: Summary
run: |
echo "### Docker Image Built Successfully! 🚀" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Image Tags:**" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
build:
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/web
dockerfile: apps/web/Dockerfile
76 changes: 6 additions & 70 deletions .github/workflows/apps-workspace-engine-router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,73 +14,9 @@ on:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

strategy:
matrix:
platform: [linux/amd64]

defaults:
run:
working-directory: apps/workspace-engine-router

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.25"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Check if Docker Hub secrets are available
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV
else
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
uses: docker/login-action@v3
if: env.DOCKERHUB_LOGIN == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ctrlplane/workspace-engine-router
tags: |
type=sha,format=short,prefix=

- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
context: apps/workspace-engine-router
push: false
file: apps/workspace-engine-router/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main' && env.DOCKERHUB_LOGIN == 'true'
with:
context: apps/workspace-engine-router
push: true
file: apps/workspace-engine-router/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/workspace-engine-router
dockerfile: apps/workspace-engine-router/Dockerfile
context: apps/workspace-engine-router
71 changes: 6 additions & 65 deletions .github/workflows/apps-workspace-engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,68 +48,9 @@ jobs:
run: go test -race ./...

build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

strategy:
matrix:
platform: [linux/amd64]

defaults:
run:
working-directory: apps/workspace-engine

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Check if Docker Hub secrets are available
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV
else
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
fi

- name: Login to Docker Hub
uses: docker/login-action@v3
if: env.DOCKERHUB_LOGIN == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ctrlplane/workspace-engine
tags: |
type=sha,format=short,prefix=

- name: Build
uses: docker/build-push-action@v6
if: github.ref != 'refs/heads/main'
with:
context: apps/workspace-engine
push: false
file: apps/workspace-engine/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}

- name: Build and Push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main' && env.DOCKERHUB_LOGIN == 'true'
with:
context: apps/workspace-engine
push: true
file: apps/workspace-engine/Dockerfile
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/workspace-engine
dockerfile: apps/workspace-engine/Dockerfile
context: apps/workspace-engine
Loading
Loading