42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
env:
|
|
LOCAL_REGISTRY: registry.wimill.xyz
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
name: Publish LSP Server
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "python-client/*W"
|
|
- "lsp/*"
|
|
tags:
|
|
- "*"
|
|
jobs:
|
|
build:
|
|
runs-on: [self-hosted, new]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Docker meta local
|
|
id: metalocal
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: ${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}-lsp
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: "{{defaultContext}}:lsp"
|
|
push: true
|
|
tags: ${{ steps.metalocal.outputs.tags }}
|
|
labels: ${{ steps.metalocal.outputs.labels }}
|
|
cache-from: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}-lsp:buildcache
|
|
cache-to: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}-lsp:buildcache,mode=max
|