First push
ASP.NET AJAX / build_web_app (push) Waiting to run
Angular / build_angular (push) Waiting to run
ASP.NET Core (with Reporting) / build_windows (push) Waiting to run
Blazor (with Reporting) / build_windows (push) Waiting to run
Blazor (with Reporting) / build_linux (push) Waiting to run
Console (.NET) / build_console (arm64, linux) (push) Waiting to run
Console (.NET) / build_console (arm64, win) (push) Waiting to run
Console (.NET) / build_console (x64, linux) (push) Waiting to run
Console (.NET) / build_console (x64, win) (push) Waiting to run
MAUI / Windows Smoketest (push) Waiting to run
MAUI / Android Smoketest (push) Waiting to run
MAUI / iOS Smoketest (push) Waiting to run
MAUI / MacCatalyst Smoketest (push) Waiting to run
WinForms (.NET Framework) / build_desktop (Release, x64) (push) Waiting to run
WinForms (.NET Framework) / build_desktop (Release, x86) (push) Waiting to run
WinUI3 / build-windows (push) Waiting to run
WPF (.NET Framework) / build_desktop (Release, x64) (push) Waiting to run
WPF (.NET Framework) / build_desktop (Release, x86) (push) Waiting to run
ASP.NET Core (with Reporting) - Docker / Microsoft Base - Publish to Docker Hub (push) Waiting to run
ASP.NET Core (with Reporting) - Docker / CentOS Base - Publish to Docker Hub (push) Waiting to run
Blazor (with Reporting) - Docker / Dockerfile Build and Publish (push) Waiting to run
ASP.NET AJAX / build_web_app (push) Waiting to run
Angular / build_angular (push) Waiting to run
ASP.NET Core (with Reporting) / build_windows (push) Waiting to run
Blazor (with Reporting) / build_windows (push) Waiting to run
Blazor (with Reporting) / build_linux (push) Waiting to run
Console (.NET) / build_console (arm64, linux) (push) Waiting to run
Console (.NET) / build_console (arm64, win) (push) Waiting to run
Console (.NET) / build_console (x64, linux) (push) Waiting to run
Console (.NET) / build_console (x64, win) (push) Waiting to run
MAUI / Windows Smoketest (push) Waiting to run
MAUI / Android Smoketest (push) Waiting to run
MAUI / iOS Smoketest (push) Waiting to run
MAUI / MacCatalyst Smoketest (push) Waiting to run
WinForms (.NET Framework) / build_desktop (Release, x64) (push) Waiting to run
WinForms (.NET Framework) / build_desktop (Release, x86) (push) Waiting to run
WinUI3 / build-windows (push) Waiting to run
WPF (.NET Framework) / build_desktop (Release, x64) (push) Waiting to run
WPF (.NET Framework) / build_desktop (Release, x86) (push) Waiting to run
ASP.NET Core (with Reporting) - Docker / Microsoft Base - Publish to Docker Hub (push) Waiting to run
ASP.NET Core (with Reporting) - Docker / CentOS Base - Publish to Docker Hub (push) Waiting to run
Blazor (with Reporting) - Docker / Dockerfile Build and Publish (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,173 @@
|
||||
name: ASP.NET Core (with Reporting) - Docker
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'src/AspNetCore/**/*'
|
||||
|
||||
env:
|
||||
WORKING_DIRECTORY: "src/AspNetCore/MyAspNetCoreApp"
|
||||
TARGET_PLATFORMS: "linux/amd64,linux/arm64"
|
||||
|
||||
jobs:
|
||||
#################### Example 1 ##########################
|
||||
# Dockerfile build and publish to Docker Hub
|
||||
# - Uses mcr.microsoft.com/dotnet/aspnet base image
|
||||
# - Webook to automatically redeploy stack in Portainer
|
||||
#########################################################
|
||||
dockerhub_msftbase_build:
|
||||
name: Microsoft Base - Publish to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CONTAINER_REPOSITORY: "lancemccarthy/aspnetcore-reporting-from-msftbase"
|
||||
DOCKERFILE_PATH: "src/AspNetCore/MyAspNetCoreApp/Dockerfile_MSRuntimeBase"
|
||||
CONTAINER_REGISTRY: "docker.io"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up QEMU for multi-arch support
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Get package metadata from Docker Hub
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{env.CONTAINER_REGISTRY}}/${{env.CONTAINER_REPOSITORY}}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{secrets.DOCKER_HUB_USERNAME}}
|
||||
password: ${{secrets.DOCKER_HUB_PAT}}
|
||||
|
||||
- name: Build and push to Docker Hub
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: ${{env.DOCKERFILE_PATH}}
|
||||
context: ${{env.WORKING_DIRECTORY}}
|
||||
platforms: ${{env.TARGET_PLATFORMS}}
|
||||
push: true
|
||||
secrets: |
|
||||
telerik-nuget-key=${{secrets.TELERIK_NUGET_KEY}}
|
||||
telerik-license-key=${{secrets.TELERIK_LICENSE_KEY}}
|
||||
tags: ${{steps.meta.outputs.tags}}
|
||||
|
||||
- name: Trigger Portainer to pull images and redeploy the stack
|
||||
run: curl -X POST ${{secrets.PORTAINER_WEBHOOK_ASPNETCORE}}
|
||||
|
||||
|
||||
#################### Example 2 ##########################
|
||||
# Dockerfile build and publish to Docker Hub
|
||||
# - Uses a CentOS Base Image
|
||||
# - Webook to automatically redeploy stack in Portainer
|
||||
#########################################################
|
||||
dockerhub_centosbase_build:
|
||||
name: CentOS Base - Publish to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CONTAINER_REPOSITORY: "lancemccarthy/aspnetcore-reporting-from-centosbase"
|
||||
DOCKERFILE_PATH: "src/AspNetCore/MyAspNetCoreApp/Dockerfile_CentOS"
|
||||
CONTAINER_REGISTRY: "docker.io"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU for multi-arch support
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Get package metadata from Docker Hub
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{env.CONTAINER_REGISTRY}}/${{env.CONTAINER_REPOSITORY}}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{secrets.DOCKER_HUB_USERNAME}}
|
||||
password: ${{secrets.DOCKER_HUB_PAT}}
|
||||
|
||||
- name: Build and push to Docker Hub
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: ${{env.DOCKERFILE_PATH}}
|
||||
context: ${{env.WORKING_DIRECTORY}}
|
||||
platforms: ${{env.TARGET_PLATFORMS}}
|
||||
push: true
|
||||
secrets: |
|
||||
telerik-nuget-key=${{secrets.TELERIK_NUGET_KEY}}
|
||||
telerik-license-key=${{secrets.TELERIK_LICENSE_KEY}}
|
||||
tags: ${{steps.meta.outputs.tags}}
|
||||
|
||||
# ############################################################################
|
||||
# ghcr.io option
|
||||
# ############################################################################
|
||||
|
||||
# Set worklow permissions for publishing to GitHub Container Registry
|
||||
# permissions:
|
||||
# contents: read
|
||||
# packages: write # to publish to GitHub container registry
|
||||
|
||||
# ghcr_msftbase_build:
|
||||
# name: Microsoft Base - Publish to GitHub Container Registry
|
||||
# runs-on: ubuntu-latest
|
||||
# env:
|
||||
# CONTAINER_REGISTRY: "ghcr.io"
|
||||
# CONTAINER_REPOSITORY: "lancemccarthy/reporting-msft-base"
|
||||
# DOCKERFILE_PATH: "src/AspNetCore/MyAspNetCoreApp/Dockerfile_MSRuntimeBase"
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v6
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v3
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v3
|
||||
|
||||
# - name: Get package metadata from Docker Hub
|
||||
# id: meta
|
||||
# uses: docker/metadata-action@v5
|
||||
# with:
|
||||
# images: ${{env.CONTAINER_REGISTRY}}/${{env.CONTAINER_REPOSITORY}}
|
||||
|
||||
# - name: Login to DockerHub
|
||||
# uses: docker/login-action@v3
|
||||
# with:
|
||||
# registry: ${{env.CONTAINER_REGISTRY}}
|
||||
# username: ${{secrets.DOCKER_HUB_USERNAME}}
|
||||
# password: ${{secrets.DOCKER_HUB_PAT}}
|
||||
|
||||
# - name: Build and push to Docker Hub
|
||||
# uses: docker/build-push-action@v5
|
||||
# with:
|
||||
# file: ${{env.DOCKERFILE_PATH}}
|
||||
# context: ${{env.WORKING_DIRECTORY}}
|
||||
# platforms: ${{env.TARGET_PLATFORMS}}
|
||||
# push: true
|
||||
# secrets: |
|
||||
# telerik-nuget-key=${{secrets.TELERIK_NUGET_KEY}}
|
||||
# telerik-license-key=${{secrets.TELERIK_LICENSE_KEY}}
|
||||
# tags: ${{steps.meta.outputs.tags}}
|
||||
|
||||
# - name: Delete old Docker images
|
||||
# uses: actions/delete-package-versions@v5
|
||||
# with:
|
||||
# package-name: "myaspnetcoreapp"
|
||||
# package-type: container
|
||||
# min-versions-to-keep: 3
|
||||
# token: ${{secrets.GITHUB_TOKEN}}
|
||||
Reference in New Issue
Block a user