Skip to content

chor: update docker image for production use #21

chor: update docker image for production use

chor: update docker image for production use #21

Workflow file for this run

name: build & publish
on:
workflow_dispatch:
push:
branches: ["ci"]
# Registry owner part must be lowercase for some tools to work
env:
REGISTRY: ghcr.io/notalib
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
# NOTE: Requires repo to have Write access under Package > Manage Actions access
packages: write
steps:
# Setup
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch history & tags, needed by gitversion
fetch-tags: true
- uses: docker/[email protected]
- name: Login to registry ghcr.io
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: nota-ci
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get version
id: version
run: |
APP_VERSION=$(grep "Software_Version = " api/common_server.go | awk '{print $3}' | sed 's/"//g')
echo "appVersion=$APP_VERSION" >> "$GITHUB_OUTPUT"
# Build lcpserver
- name: Extract image metadata
id: meta_lcp
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}/lcpserver
tags: |
latest
type=sha
type=ref,event=branch
${{ steps.version.outputs.appVersion }}
- name: Build LCP Server
uses: docker/[email protected]
with:
context: "."
file: "./ci/Dockerfile"
target: runtime-lcp
push: ${{ github.event_name != 'pull_request' }} # Don't push on PR
tags: ${{ steps.meta_lcp.outputs.tags }}
labels: ${{ steps.meta_lcp.outputs.labels }}
platforms: linux/amd64,linux/arm64
# Build lsdserver
- name: Extract image metadata
id: meta_lsd
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}/lsdserver
tags: |
latest
type=sha
type=ref,event=branch
${{ steps.version.outputs.appVersion }}
- name: Build LSD Server
uses: docker/[email protected]
with:
context: "."
file: "./ci/Dockerfile"
target: runtime-lsd
push: ${{ github.event_name != 'pull_request' }} # Don't push on PR
tags: ${{ steps.meta_lsd.outputs.tags }}
labels: ${{ steps.meta_lsd.outputs.labels }}
platforms: linux/amd64,linux/arm64