Fixing location header not respecting custom value #37
Workflow file for this run
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 Deploy to staging | |
on: | |
pull_request: | |
branches: [main] | |
env: | |
AZURE_WEBAPP_NAME: httpstatus-preview | |
IMAGE_NAME: ${{ github.repository }} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-images: | |
runs-on: ubuntu-latest | |
name: Build Docker images for Azure Container Registry and GitHub Container Registry | |
environment: | |
name: build | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ secrets.GH_REGISTRY_URL }}/${{ env.IMAGE_NAME }},${{ secrets.AZURE_REGISTRY_URL }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=sha,format=long,suffix=-preview | |
- name: ACR authentication | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.AZURE_REGISTRY_URL }} | |
username: ${{ secrets.AZURE_REGISTRY_USERNAME }} | |
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }} | |
- name: GPR authentication | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.GH_REGISTRY_URL }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: src | |
file: src/Teapot.Web/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
# platforms: linux/amd64,linux/arm64 | |
platforms: linux/amd64 | |
deploy-azure: | |
runs-on: ubuntu-latest | |
name: Deploy to Azure | |
environment: | |
name: production | |
needs: [build-images] | |
steps: | |
- name: Azure authentication | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Deploy to Azure WebApp | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
images: ${{ secrets.AZURE_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ github.sha }}-preview |