[ASPNET] Removed Reporting's use of json.net, now relied on system.Text! #8
This file contains hidden or 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: Publish Container Images [aspnetcore] | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/AspNetCore/**/*' | |
| env: | |
| WORKING_DIRECTORY: "src/AspNetCore/MyAspNetCoreApp" | |
| TARGET_PLATFORMS: "linux/amd64,linux/arm64" | |
| jobs: | |
| ########################### | |
| # Uses a CentOS Base Image | |
| ########################### | |
| 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" | |
| 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_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: | | |
| ${{env.CONTAINER_REPOSITORY}}:latest | |
| ######################################################### | |
| # Uses ASPNET Runtime Base Image | |
| ######################################################### | |
| 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" | |
| 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_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: | | |
| ${{env.CONTAINER_REPOSITORY}}:latest | |
| # ############################################################################ | |
| # 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@v4 | |
| # 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_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: | | |
| # ${{env.CONTAINER_REGISTRY}}/${{env.CONTAINER_REPOSITORY}}:latest | |
| # - 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}} |