Skip to content

Merge remote-tracking branch 'origin/main' #329

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #329

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@v4
- 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: ${{ vars.REGISTRY_LOGIN_SERVER }}
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build ./webshot \
-t ${{ vars.REGISTRY_LOGIN_SERVER }}/marxan-webshot:${{ github.sha }} \
-t ${{ vars.REGISTRY_LOGIN_SERVER }}/marxan-webshot:${{ github.ref != 'refs/heads/main' && 'staging' || 'production' }}
docker push -a ${{ vars.REGISTRY_LOGIN_SERVER }}/marxan-webshot