cohort filter: clean label, visible delete, resolve saved cohort (#349) #340
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 Build and Push | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - "apps/api/**" | |
| - "apps/worker/**" | |
| - "apps/start/**" | |
| - "packages/**" | |
| - "!packages/sdks/**" | |
| - "**Dockerfile" | |
| - ".github/workflows/**" | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| api: ${{ steps.filter.outputs.api }} | |
| worker: ${{ steps.filter.outputs.worker }} | |
| public: ${{ steps.filter.outputs.public }} | |
| dashboard: ${{ steps.filter.outputs.dashboard }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| base: "main" | |
| filters: | | |
| api: | |
| - 'apps/api/**' | |
| - 'packages/**' | |
| - '.github/workflows/**' | |
| worker: | |
| - 'apps/worker/**' | |
| - 'packages/**' | |
| - '.github/workflows/**' | |
| public: | |
| - 'apps/public/**' | |
| - 'packages/**' | |
| - '.github/workflows/**' | |
| dashboard: | |
| - 'apps/start/**' | |
| - 'packages/**' | |
| - '.github/workflows/**' | |
| build-and-push-api: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.api == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Generate short SHA | |
| id: short-sha | |
| run: | | |
| echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Azure Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.AZURE_DASH_REGISTRY_URL }} | |
| username: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_ID }} | |
| password: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_SECRET }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: apps/api/Dockerfile | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: | | |
| ${{ secrets.AZURE_DASH_REGISTRY_URL }}/openpanel-api:${{ steps.short-sha.outputs.sha }} | |
| ${{ secrets.AZURE_DASH_REGISTRY_URL }}/openpanel-api:latest | |
| build-args: | | |
| DATABASE_URL=postgresql://dummy:dummy@localhost:5432/dummy | |
| build-and-push-worker: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.worker == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Generate short SHA | |
| id: short-sha | |
| run: | | |
| echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Azure Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.AZURE_DASH_REGISTRY_URL }} | |
| username: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_ID }} | |
| password: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_SECRET }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: apps/worker/Dockerfile | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: | | |
| ${{ secrets.AZURE_DASH_REGISTRY_URL }}/openpanel-worker:${{ steps.short-sha.outputs.sha }} | |
| ${{ secrets.AZURE_DASH_REGISTRY_URL }}/openpanel-worker:latest | |
| build-args: | | |
| DATABASE_URL=postgresql://dummy:dummy@localhost:5432/dummy | |
| build-and-push-dashboard: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.dashboard == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Generate short SHA | |
| id: short-sha | |
| run: | | |
| echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Azure Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.AZURE_DASH_REGISTRY_URL }} | |
| username: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_ID }} | |
| password: ${{ secrets.AZURE_DASH_REGISTRY_CLIENT_SECRET }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: apps/start/Dockerfile | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: | | |
| ${{ secrets.AZURE_DASH_REGISTRY_URL }}/openpanel-dashboard:${{ steps.short-sha.outputs.sha }} | |
| ${{ secrets.AZURE_DASH_REGISTRY_URL }}/openpanel-dashboard:latest | |
| build-args: | | |
| NO_CLOUDFLARE=1 |