Skip to content

2023.1016

2023.1016 #8

Workflow file for this run

name: Publish Worker
on:
release:
types: [ published ]
permissions:
packages: read
jobs:
docker-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup GitHub NuGet
run: dotnet nuget update source github --username USERNAME --password ${{ github.token }} --store-password-in-clear-text
- name: Build Worker
run: dotnet publish -c Release -p:UseAppHost=false -p:Version=${{ github.event.release.tag_name }} DragonFruit.OnionFruit.Web.Worker
- name: Docker Build and Push
uses: docker/build-push-action@v5
with:
context: DragonFruit.OnionFruit.Web.Worker/bin/Release/net7.0/publish
tags: dragonfruitdotnet/onionfruit-web:worker-linux
file: DragonFruit.OnionFruit.Web.Worker/Dockerfile
platforms: linux/arm64,linux/amd64
push: true
docker-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup GitHub NuGet
run: dotnet nuget update source github --username USERNAME --password ${{ github.token }} --store-password-in-clear-text
- name: Build Worker
run: dotnet publish -c Release -p:UseAppHost=false -p:Version=${{ github.event.release.tag_name }} DragonFruit.OnionFruit.Web.Worker
- name: Docker Build
run: docker build -f DragonFruit.OnionFruit.Web.Worker\Dockerfile -t dragonfruitdotnet/onionfruit-web:worker-windows --build-arg "IMAGE_VARIANT=7.0-nanoserver-ltsc2022" DragonFruit.OnionFruit.Web.Worker\bin\Release\net7.0\publish
- name: Docker Push
run: docker push dragonfruitdotnet/onionfruit-web:worker-windows
docker-multiarch-image:
runs-on: ubuntu-latest
needs:
- docker-linux
- docker-windows
steps:
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create MultiArch+MultiOS Manifest
run: docker buildx imagetools create -t dragonfruitdotnet/onionfruit-web:worker -t dragonfruitdotnet/onionfruit-web:worker-${{ github.event.release.tag_name }} dragonfruitdotnet/onionfruit-web:worker-windows dragonfruitdotnet/onionfruit-web:worker-linux