Always show environment switcher in user menu #129
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: Build and Push Docker Images | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: tpsappscriptingacr.azurecr.io | |
| IMAGE_EDITOR: app-scripting-editor | |
| IMAGE_API: app-scripting-editor-api | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Docker login to ACR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ secrets.ACR_USERNAME }} | |
| password: ${{ secrets.ACR_PASSWORD }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # ---- Step 1: Build Frontend (Editor) image first ---- | |
| - name: Build & push Editor image (Frontend/nginx) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| build-args: | | |
| VITE_APP_VERSION=1.0.0 | |
| VITE_APP_BUILD_TIME=${{ github.event.head_commit.timestamp }} | |
| VITE_APP_COMMIT_SHA=${{ github.sha }} | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_EDITOR }}:latest | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_EDITOR }}:${{ github.sha }} | |
| cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_EDITOR }}:buildcache | |
| cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_EDITOR }}:buildcache,mode=max | |
| # ---- Step 2: Build API (Node/Express + Frontend) image ---- | |
| # This uses the editor image we just built above | |
| - name: Build & push API image (Node/Express + SPA) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./server/Dockerfile | |
| push: true | |
| build-args: | | |
| REGISTRY=${{ env.REGISTRY }} | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_API }}:latest | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_API }}:${{ github.sha }} | |
| cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_API }}:buildcache | |
| cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_API }}:buildcache,mode=max |