chore: make room to determine stream routing (#349) #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Server - build and push develop | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ develop ] | |
paths: | |
- "diode-server/**" | |
- "!diode-server/docker/**" | |
- "!diode-server/Makefile" | |
- "!diode-server/README.md" | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GO_VERSION: '1.24' | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-latest | |
outputs: | |
apps: ${{ steps.apps.outputs.apps }} | |
steps: | |
- name: Get apps | |
id: apps | |
run: | | |
echo 'apps=["auth", "ingester", "reconciler"]' >> "$GITHUB_OUTPUT" | |
build: | |
name: Build - ${{ matrix.app }} | |
needs: [ setup ] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
app: ${{ fromJSON(needs.setup.outputs.apps) }} | |
env: | |
BUILD_VERSION: 0.0.0 | |
BUILD_COMMIT: ${{ github.sha }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3 | |
- name: Set build info | |
run: | | |
echo $BUILD_COMMIT > ./diode-server/version/BUILD_COMMIT.txt | |
echo $BUILD_VERSION > ./diode-server/version/BUILD_VERSION.txt | |
- name: Setup JFrog CLI | |
id: setup-jfrog-cli | |
uses: jfrog/setup-jfrog-cli@ff5cb544114ffc152db9cea1cd3d5978d5074946 # v4.5.11 | |
env: | |
JF_URL: https://netboxlabs.jfrog.io | |
JF_PROJECT: obs | |
with: | |
oidc-provider-name: platform-setup-jfrog-cli | |
- name: Login to JFrog Artifactory | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #v3 | |
with: | |
registry: netboxlabs.jfrog.io | |
username: ${{ steps.setup-jfrog-cli.outputs.oidc-user }} | |
password: ${{ steps.setup-jfrog-cli.outputs.oidc-token }} | |
- name: Build image and push | |
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6 | |
with: | |
context: diode-server | |
file: diode-server/docker/Dockerfile-build.${{ matrix.app }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: | | |
netboxlabs.jfrog.io/obs-builds/diode-${{ matrix.app }}:develop | |
build-args: | | |
GO_VERSION=${{ env.GO_VERSION }} | |
SVC=${{ matrix.app }} |