Merge pull request #102 from TransactionProcessing/task/#98_update_sh… #55
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 Pre-Release Docker | |
| on: | |
| push: | |
| # branches to consider in the event; optional, defaults to all | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| name: "Publish Pre-Release Docker" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Install NET 9 | |
| uses: actions/[email protected] | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore Nuget Packages | |
| run: dotnet restore TestHosts/TestHosts.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} | |
| - name: Build Code | |
| run: dotnet build TestHosts/TestHosts.sln --configuration Release | |
| - name: Publish Images to Docker Hub | |
| run: | | |
| docker build ./TestHosts --file TestHosts/TestHosts/Dockerfile --tag stuartferguson/testhosts:master | |
| docker login --username=${{ secrets.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }} | |
| docker push stuartferguson/testhosts:master | |
| buildwidows: | |
| name: "Publish Pre-Release Docker for Windows" | |
| env: | |
| ASPNETCORE_ENVIRONMENT: "Production" | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Publish Windows Images to Docker Hub | |
| run: | | |
| docker build ./TestHosts --file TestHosts/TestHosts/Dockerfilewindows --tag stuartferguson/testhostswindows:master | |
| docker login --username=${{ secrets.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }} | |
| docker push stuartferguson/testhostswindows:master |