Skip to content

Added service discovery #54

Added service discovery

Added service discovery #54

name: Publish Slim Docker Image on Commit
on:
push:
branches:
- master
paths:
- '.github/workflows/docker-publish-qa-slim.yml'
- 'src/**'
- 'Directory.Build.props'
- 'Directory.Packages.props'
workflow_dispatch:
jobs:
build-and-publish-docker-slim-qa:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
#platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-linux-slim-qa-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-linux-slim-qa-
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: P3D-Legacy
password: ${{ secrets.TOKEN_GPR }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./src/P3D.Legacy.Server/Image.Slim.Dockerfile
#platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
build-args: |
DATE=$(date --iso-8601=s)
REVISION=$(git rev-parse --short HEAD)
push: true
tags: ghcr.io/p3d-legacy/p3d-legacy-server:latest-qa
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Trigger Deploy
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.TOKEN_GPR }}
repository: P3D-Legacy/P3D-Legacy-Server
event-type: deploy-docker-image-slim-qa