Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
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
81 changes: 81 additions & 0 deletions .github/workflows/build-and-test-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: binary builds

on:
workflow_dispatch:

repository_dispatch:
types:
- webhook

push:
paths:
- "apps/**/**"
- "pkg/**"
- "grpc-interfaces/**"
- "common/**"
- "go.*"
- ".github/workflows/**"

permissions:
contents: read
packages: write

jobs:
docker-builds:
strategy:
matrix:
app:
- accounts
- auth
- comms
- console
- container-registry
- iam
- infra
- worker-audit-logging
- webhook
- websocket-server
- message-office
- tenant-agent

runs-on: ubuntu-latest
name: Deploy to Docker Image
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Setup Golang caches
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.5

- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install UPX
run: |
curl -L0 https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-amd64_linux.tar.xz > upx.tar.xz
tar -xf upx.tar.xz
sudo mv upx-4.2.1-amd64_linux/upx /usr/local/bin

- name: Build Binary
run: |
pushd apps/${{matrix.app}}
task build
popd
131 changes: 0 additions & 131 deletions .github/workflows/build-container.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/workflows/container-build/Containerfile.local

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/container-build/Taskfile.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/delete-images-from-ghcr.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/gateway-container.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .tools/taskfiles/container-image-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 3

tasks:
docker:
env:
CGO_ENABLED: 0
vars:
BuiltAt:
sh: date | sed 's/\s/_/g'
preconditions:
- sh: '[ -n "{{.Out}}" ]'
msg: var Out must have a value
cmds:
- go build -v -ldflags="-s -w -X github.com/kloudlite/api/common.BuiltAt=\"{{.BuiltAt}}\"" -o {{.Out}}
- upx {{.Out}}
12 changes: 12 additions & 0 deletions .tools/taskfiles/docker-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 3

tasks:
build:
vars:
Containerfile: ./Containerfile
Dir: ./
preconditions:
- sh: '[ -n "{{.Image}}" ]'
msg: var Image must have a value
cmds:
- echo docker buildx build -f {{.Containerfile}} -t {{.Image}} {{.Dir}} {{.BuildArgs}} --push
Loading