Build Dashboard #15
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 Dashboard | |
| on: | |
| workflow_run: | |
| workflows: ["Check Dashboard"] | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Branch to build' | |
| required: true | |
| default: 'main' | |
| type: string | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.branch || github.ref }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Add docker layer caching to avoid doing extra computation | |
| - uses: satackey/action-docker-layer-caching@v0.0.11 | |
| continue-on-error: true | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: frontends/dashboard | |
| file: frontends/dashboard/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ghcr.io/txpipe/metis-dashboard,ghcr.io/txpipe/metis-dashboard:${{ github.sha }} |