Fixes issue with Windows platform relative image paths #23
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: Deploy Microsoft Store packager to staging | |
| on: | |
| push: | |
| paths: | |
| - "apps/pwabuilder-microsoft-store/**" | |
| branches: [ "main" ] | |
| pull_request: | |
| paths: | |
| - "apps/pwabuilder-microsoft-store/**" | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: 'true' | |
| - uses: microsoft/variable-substitution@v1 | |
| with: | |
| files: './apps/pwabuilder-microsoft-store/appsettings.Production.json' | |
| env: | |
| AppSettings.ApplicationInsightsConnectionString: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING }} | |
| - name: Create destination directory | |
| run: mkdir -p apps/pwabuilder-microsoft-store/Resources/cli/PWABuilder | |
| - name: Login with Azure CLI with federated credentials | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_APP_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Download zipped pwa_builder internal tool from Azure Blob Storage | |
| run: | | |
| az storage blob download ` | |
| --account-name ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }} ` | |
| --container-name ${{ secrets.AZURE_STORAGE_PWABUILDEREXE_CONTAINER_NAME }} ` | |
| --name ${{ secrets.AZURE_STORAGE_PWABUILDEREXE_BLOB_NAME }} ` | |
| --file pwabuilder.zip ` | |
| --auth-mode login | |
| - name: Extracting pwa_builder zip file | |
| run: unzip -o pwabuilder.zip -d apps/pwabuilder-microsoft-store/Resources/cli/PWABuilder | |
| - name: Verify pwa_builder extraction | |
| run: Get-ChildItem apps/pwabuilder-microsoft-store/Resources/cli/PWABuilder -Recurse | Format-List | |
| - name: Log in to Azure docker registry (ACR) | |
| run: az acr login --name pwabuilder | |
| - name: docker info | |
| run: docker info | |
| - name: Docker build | |
| working-directory: ./apps/pwabuilder-microsoft-store | |
| run: docker build . --file Dockerfile --tag pwabuilder.azurecr.io/pwa-windows:production -m 2GB | |
| - name: Docker push | |
| working-directory: ./apps/pwabuilder-microsoft-store | |
| run: docker push pwabuilder.azurecr.io/pwa-windows:production | |
| deploy: | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| needs: build | |
| environment: | |
| name: staging | |
| url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
| steps: | |
| - name: Login with Azure CLI with federated credentials | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_APP_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Deploy to Azure Web App | |
| id: deploy-to-webapp | |
| uses: azure/webapps-deploy@v2 | |
| with: | |
| app-name: pwabuilder-windows-docker | |
| slot-name: staging | |
| images: pwabuilder.azurecr.io/pwa-windows:production |