Skip to content

Commit

Permalink
Adjust docker image build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMacocian committed Nov 24, 2023
1 parent 49a814c commit 456e66b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/docker-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v2

- name: Publish .NET project
run: dotnet publish GuildWarsPartySearch/GuildWarsPartySearch.Server.csproj -c Release

- name: Log in to Docker Hub
run: |
docker login guildwarspartysearch.azurecr.io --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_PASSWORD }}"
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/guildwarspartysearch:latest
context: GuildWarsPartySearch/
file: Dockerfile
build-args: |
BUILD_DIR=out
run: |
cd GuildWarsPartySearch
.\BuildDockerImage.ps1
docker push guildwarspartysearch.azurecr.io/guildwarspartysearch.server
shell: powershell
3 changes: 2 additions & 1 deletion GuildWarsPartySearch/BuildDockerImage.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dotnet publish -c Release
docker build -t guildwarspartysearch.server .
docker build -t guildwarspartysearch.server .
docker tag guildwarspartysearch.server guildwarspartysearch.azurecr.io/guildwarspartysearch.server

0 comments on commit 456e66b

Please sign in to comment.