Docker Image CI #20
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: Docker Image CI | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| base-image-tag: | |
| description: 'Tag for aspnet image' | |
| required: true | |
| publish-version: | |
| required: true | |
| description: 'Publish tag version' | |
| publish-major-version: | |
| required: true | |
| description: 'Publish major tag version' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| lfs: 'true' | |
| - # Add support for more platforms with QEMU (optional) | |
| # https://github.com/docker/setup-qemu-action | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push runtime-deps | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| target: runtime-deps | |
| build-args: VERSION=${{github.event.inputs.base-image-tag}} | |
| tags: | | |
| robonet/dotnet-scratch:runtime-deps-${{github.event.inputs.publish-major-version}} | |
| robonet/dotnet-scratch:runtime-deps-${{github.event.inputs.publish-version}} | |
| - name: Build and push runtime-deps-globalization | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| target: runtime-deps-globalization | |
| build-args: VERSION=${{github.event.inputs.base-image-tag}} | |
| tags: | | |
| robonet/dotnet-scratch:runtime-deps-globalization-${{github.event.inputs.publish-major-version}} | |
| robonet/dotnet-scratch:runtime-deps-globalization-${{github.event.inputs.publish-version}} | |
| - name: Build and push aspnet | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| target: aspnet | |
| build-args: VERSION=${{github.event.inputs.base-image-tag}} | |
| tags: | | |
| robonet/dotnet-scratch:aspnet-${{github.event.inputs.publish-major-version}} | |
| robonet/dotnet-scratch:aspnet-${{github.event.inputs.publish-version}} | |
| - name: Build and push aspnet-globalization | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| target: aspnet-globalization | |
| build-args: VERSION=${{github.event.inputs.base-image-tag}} | |
| tags: | | |
| robonet/dotnet-scratch:aspnet-globalization-${{github.event.inputs.publish-major-version}} | |
| robonet/dotnet-scratch:aspnet-globalization-${{github.event.inputs.publish-version}} |