push-to-docker-hub #3
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: push-to-docker-hub | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| imageTag: | |
| description: Docker image tag to be applied | |
| required: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Building and copying React | |
| - name: npm install durablefunctionsmonitor.react | |
| run: npm install -legacy-peer-deps | |
| working-directory: durablefunctionsmonitor.react | |
| - name: npm build durablefunctionsmonitor.react | |
| run: npm run build | |
| working-directory: durablefunctionsmonitor.react | |
| - name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics | |
| run: | | |
| rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics | |
| cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics | |
| - name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics | |
| run: | | |
| rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics | |
| cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics | |
| # Building and testing .NET | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests | |
| run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj | |
| - name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests | |
| run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj | |
| - name: login to Docker hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: build and push durablefunctionsmonitor.dotnetbackend | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./durablefunctionsmonitor.dotnetbackend | |
| push: true | |
| tags: scaletone/durablefunctionsmonitor:${{ github.event.inputs.imageTag }} | |
| - name: build and push custom-backends/mssql | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./custom-backends/mssql | |
| push: true | |
| tags: scaletone/durablefunctionsmonitor.mssql:${{ github.event.inputs.imageTag }} | |
| - name: build and push custom-backends/netherite | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./custom-backends/netherite | |
| push: true | |
| tags: scaletone/durablefunctionsmonitor.netherite:${{ github.event.inputs.imageTag }} |