Skip to content

fix(gui): focus window on initial launch #4

fix(gui): focus window on initial launch

fix(gui): focus window on initial launch #4

Workflow file for this run

name: Build Codeoff Docker image
on:
push:
tags: [ 'v*.*.*' ]
workflow_dispatch:
inputs:
version:
description: Release version (for example v1.2.3)
required: true
type: string
default: v0.0.0
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: maimorylab/codeoff-server
jobs:
build:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set release version
id: version
shell: bash
run: |
if [[ ! "$RELEASE_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "version must match vX.Y.Z" >&2
exit 1
fi
echo "tag=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
echo "version=${RELEASE_VERSION#v}" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Restore build caches
uses: actions/cache@v5
with:
path: |
${{ runner.temp }}/go-build-cache
${{ runner.temp }}/npm-cache
key: ${{ runner.os }}-docker-build-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-docker-build-
- name: Inject Go build cache
uses: reproducible-containers/buildkit-cache-dance@4b2444fec0c0fb9dbf175a96c094720a692ef810 # v2.1.4
with:
cache-source: ${{ runner.temp }}/go-build-cache
scratch-dir: ${{ runner.temp }}/buildkit-cache-dance
- name: Inject npm cache
uses: reproducible-containers/buildkit-cache-dance@4b2444fec0c0fb9dbf175a96c094720a692ef810 # v2.1.4
with:
cache-source: ${{ runner.temp }}/npm-cache
cache-target: /root/.npm
scratch-dir: ${{ runner.temp }}/buildkit-cache-dance-npm
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
build-args: |
APP_VERSION=${{ steps.version.outputs.version }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max