fix: sort aggregation values to avoid deadlocks in process_pending (#… #56
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: Publish GHCR Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: publish-ghcr-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-and-push-backend: | |
| if: github.repository == 'kernelci/dashboard' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| digest: ${{ steps.build.outputs.digest }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compute image prefix | |
| id: meta | |
| run: echo "prefix=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push backend image | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./backend | |
| push: true | |
| tags: | | |
| ${{ steps.meta.outputs.prefix }}/dashboard-backend:latest | |
| ${{ steps.meta.outputs.prefix }}/dashboard-backend:${{ github.sha }} | |
| build-and-push-dashboard: | |
| if: github.repository == 'kernelci/dashboard' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| digest: ${{ steps.build.outputs.digest }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compute image prefix | |
| id: meta | |
| run: echo "prefix=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push dashboard image | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./dashboard/Dockerfile | |
| push: true | |
| tags: | | |
| ${{ steps.meta.outputs.prefix }}/dashboard-frontend:latest | |
| ${{ steps.meta.outputs.prefix }}/dashboard-frontend:${{ github.sha }} | |
| build-and-push-proxy: | |
| if: github.repository == 'kernelci/dashboard' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| digest: ${{ steps.build.outputs.digest }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compute image prefix | |
| id: meta | |
| run: echo "prefix=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push proxy image | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./proxy | |
| push: true | |
| tags: | | |
| ${{ steps.meta.outputs.prefix }}/dashboard-proxy:latest | |
| ${{ steps.meta.outputs.prefix }}/dashboard-proxy:${{ github.sha }} | |
| verify: | |
| if: always() | |
| needs: | |
| - build-and-push-backend | |
| - build-and-push-dashboard | |
| - build-and-push-proxy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Image publish summary | |
| run: | | |
| echo "### Published GHCR Images" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| Image | Digest |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| ----- | ------ |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| dashboard-backend | \`${{ needs.build-and-push-backend.outputs.digest }}\` |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| dashboard-frontend | \`${{ needs.build-and-push-dashboard.outputs.digest }}\` |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| dashboard-proxy | \`${{ needs.build-and-push-proxy.outputs.digest }}\` |" >> "$GITHUB_STEP_SUMMARY" |