824 unable to select time all rooms page (#827) #545
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: Docker | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| - "dev" | |
| env: | |
| ENVIRONMENT: ${{ github.ref_name == 'master' && 'prod' || 'staging' }} | |
| IMAGE_NAME: ${{ github.ref_name == 'master' && 'freerooms' || 'freerooms-staging' }} | |
| BRANCH_NAME: ${{ github.base_ref || github.ref_name }} | |
| jobs: | |
| build: | |
| name: "Build (${{ matrix.name }})" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| context: [backend, frontend] | |
| include: | |
| - context: backend | |
| name: backend | |
| - context: frontend | |
| name: frontend | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: arm64 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - name: Create staging .env file | |
| if: ${{ env.BRANCH_NAME == 'dev' && matrix.context == 'frontend' }} | |
| run: echo "NEXT_PUBLIC_STAGING=true" >> .env | |
| working-directory: frontend | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} | |
| platforms: linux/amd64 | |
| file: ${{ matrix.context }}.dockerfile | |
| tags: | | |
| ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-${{ matrix.name }}:${{ github.sha }} | |
| ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-${{ matrix.name }}:latest | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| ${{ env.BRANCH_NAME == 'dev' && matrix.context == 'frontend' && 'NEXT_PUBLIC_STAGING=true' || '' }} | |
| deploy: | |
| name: Deploy (CD) | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| concurrency: staging | |
| if: ${{ github.event_name != 'pull_request' && (github.ref_name == 'dev' || github.ref_name == 'master') }} | |
| steps: | |
| - name: Dispatch deployment | |
| uses: devsoc-unsw/deployment-dispatch-action@main | |
| with: | |
| deployment-dispatcher-app-id: ${{ vars.DEPLOYMENT_DISPATCHER_APP_ID }} | |
| deployment-dispatcher-app-private-key: ${{ secrets.DEPLOYMENT_DISPATCHER_APP_PRIVATE_KEY }} | |
| updates: | | |
| ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-backend=${{ github.sha }} | |
| ghcr.io/devsoc-unsw/${{ env.IMAGE_NAME }}-frontend=${{ github.sha }} |