add github workflow for feature-alert-channels branch #1
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 (Feature Alert Channels) | |
| on: | |
| push: | |
| branches: | |
| - feature-alert-channels | |
| paths: | |
| - 'dashboard/**' | |
| - 'src/**' | |
| - '.github/workflows/build-and-push-feature-alert-channels.yml' | |
| tags: | |
| - 'v*.*.*' | |
| pull_request: | |
| branches: | |
| - feature-alert-channels | |
| paths: | |
| - 'dashboard/**' | |
| - 'src/**' | |
| - '.github/workflows/build-and-push-feature-alert-channels.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY: ghcr.io | |
| CORE_IMAGE_NAME: ${{ github.repository_owner }}/simplens-core-feat-alt-ch | |
| DASHBOARD_IMAGE_NAME: ${{ github.repository_owner }}/simplens-dashboard-feat-alt-ch | |
| jobs: | |
| build-core: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata for simplens-core-feat-alt-ch | |
| id: meta-core | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.CORE_IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=sha,prefix= | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push simplens-core-feat-alt-ch | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta-core.outputs.tags }} | |
| labels: ${{ steps.meta-core.outputs.labels }} | |
| cache-from: type=gha,scope=core-feat-alt-ch | |
| cache-to: type=gha,mode=max,scope=core-feat-alt-ch | |
| platforms: linux/amd64 | |
| build-dashboard: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata for simplens-dashboard-feat-alt-ch | |
| id: meta-dashboard | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.DASHBOARD_IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=sha,prefix= | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push simplens-dashboard-feat-alt-ch | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./dashboard | |
| file: ./dashboard/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta-dashboard.outputs.tags }} | |
| labels: ${{ steps.meta-dashboard.outputs.labels }} | |
| cache-from: type=gha,scope=dashboard-feat-alt-ch | |
| cache-to: type=gha,mode=max,scope=dashboard-feat-alt-ch | |
| platforms: linux/amd64 |