Update dependencies #53
This file contains 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: Build and Push Docker Image | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- "GuildWarsPartySearch.Common/**" | |
- "GuildWarsPartySearch/**" | |
- ".github/workflows/docker-deploy.yaml" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.x' | |
- name: Log in to Docker Hub | |
run: | | |
docker login guildwarspartysearch.azurecr.io --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_PASSWORD }}" | |
- name: Replace Config Placeholders | |
shell: pwsh | |
run: | | |
cd GuildWarsPartySearch | |
$content = Get-Content Config.Release.json | |
$content = $content.Replace("[APIKEY]", "${{ secrets.APIKEY }}") | |
$content = $content.Replace("[CERTIFICATE_BASE64]", "${{ secrets.CERTIFICATE_BASE64 }}") | |
$content = $content.Replace("[AZURE_INSIGHTS_INSTRUMENTATIONKEY]", "${{ secrets.AZURE_INSIGHTS_INSTRUMENTATIONKEY }}") | |
$content = $content.Replace("[AZURE_CLIENT_SECRET]", "${{ secrets.AZURE_CLIENT_SECRET }}") | |
$content = $content.Replace("[AZURE_CLIENT_ID]", "${{ secrets.AZURE_CLIENT_ID }}") | |
$content = $content.Replace("[AZURE_TENANT_ID]", "${{ secrets.AZURE_TENANT_ID }}") | |
Set-Content -Path Config.Release.json -Value $content | |
Write-Host "Placeholder replaced successfully in Config.Release.json" | |
- name: Build and push Docker image | |
run: | | |
cd GuildWarsPartySearch | |
.\BuildDockerImage.ps1 | |
docker push guildwarspartysearch.azurecr.io/guildwarspartysearch.server | |
shell: pwsh |