replaces Vercel domains with production #299
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: Publish Webshot Docker image | |
permissions: | |
id-token: write | |
contents: read | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'staging' | |
paths: | |
- '.github/**' | |
- 'api/**' | |
- 'app/**' | |
- 'webshot/**' | |
workflow_dispatch: | |
jobs: | |
push_webshot_to_registry: | |
name: Push Webshot Docker image to Azure Container Registry | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Login via Azure CLI | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Build and push image | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- run: | | |
docker build ./webshot \ | |
-t ${{ secrets.REGISTRY_LOGIN_SERVER }}/marxan-webshot:${{ github.sha }} \ | |
-t ${{ secrets.REGISTRY_LOGIN_SERVER }}/marxan-webshot:${{ github.ref != 'refs/heads/main' && 'staging' || 'production' }} | |
docker push -a ${{ secrets.REGISTRY_LOGIN_SERVER }}/marxan-webshot |