feat: support binary transport #20
This file contains 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: Containerize | |
on: | |
push: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-backend: | |
runs-on: ubuntu-22.04 | |
env: | |
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
defaults: | |
run: | |
working-directory: ./DisplayUtil | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8" | |
cache: true | |
cache-dependency-path: DisplayUtil/DisplayUtil.csproj | |
- name: Restore NuGet dependencies | |
run: dotnet restore --locked-mode | |
- name: Build server | |
run: dotnet publish -c Release --no-restore | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: backend-artifacts | |
path: DisplayUtil/bin/Release/net8.0/publish/ | |
build-docker-image: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
packages: write | |
needs: | |
- build-backend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: backend-artifacts | |
path: build/ | |
- name: Docker Login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Metadata action | |
id: docker_metadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.docker_metadata.outputs.tags }} | |
labels: ${{ steps.docker_metadata.outputs.labels }} |