Skip to content

Commit

Permalink
Update docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhu authored Nov 26, 2024
1 parent 4c9d608 commit cb051a2
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,25 @@ jobs:
with:
scheme: semver
increment: patch

- run: git tag ${{ steps.version.outputs.version }}
- run: git push origin ${{ steps.version.outputs.version }}

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

# - name: Restore dependencies
# run: dotnet restore CleanAspire.sln
# - name: Build
# run: dotnet build CleanAspire.sln --no-restore

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Publish Docker image using .NET SDK

- name: Build and push CleanAspire.ClientApp image
working-directory: ./src/CleanAspire.ClientApp
run: |
dotnet publish --os linux --arch x64 "src/CleanAspire.AppHost/CleanAspire.AppHost.csproj" -c Release /p:PublishProfile=DefaultContainer /p:ContainerRepository=${{ secrets.DOCKER_USERNAME }}/cleanaspire /p:ContainerTag=${{ steps.version.outputs.version }}
docker build -t ${{ secrets.DOCKER_USERNAME }}/cleanaspire-clientapp:${{ steps.version.outputs.version }} .
docker push ${{ secrets.DOCKER_USERNAME }}/cleanaspire-clientapp:${{ steps.version.outputs.version }}
- name: Push Docker image to Docker Hub
- name: Build and push CleanAspire.Api image
working-directory: ./src/CleanAspire.Api
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/cleanaspire:${{ steps.version.outputs.version }}
docker build -t ${{ secrets.DOCKER_USERNAME }}/cleanaspire-api:${{ steps.version.outputs.version }} .
docker push ${{ secrets.DOCKER_USERNAME }}/cleanaspire-api:${{ steps.version.outputs.version }}

0 comments on commit cb051a2

Please sign in to comment.