Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
fix docker (#1886)
Thibault Le Ouay55856e8a8a81
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.ymlindex 2c8d5ae07..8ad2e2275 100644--- a/.github/workflows/docker-publish.yml+++ b/.github/workflows/docker-publish.yml@@ -21,46 +21,86 @@ on:default: 'server,dashboard,workflows,private-location,status-page,checker'type: string+concurrency:+ group: docker-${{ github.ref }}+ cancel-in-progress: true+env:REGISTRY: ghcr.ioIMAGE_NAME: openstatusjobs:+ prepare:+ runs-on: ubuntu-latest+ outputs:+ services: ${{ steps.set-services.outputs.services }}+ steps:+ - name: Checkout repository+ uses: actions/checkout@v4+ with:+ fetch-depth: 2++ - name: Determine services to build+ id: set-services+ run: |+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ # Convert comma-separated input to JSON array+ SERVICES=$(echo "${{ inputs.services }}" | tr ',' '\n' | jq -R . | jq -sc .)+ else+ # Detect changed files+ CHANGED=$(git diff --name-only HEAD~1 HEAD)+ SERVICES_LIST=()++ # packages/** changes affect all services+ if echo "$CHANGED" | grep -q '^packages/'; then+ SERVICES_LIST=("server" "dashboard" "workflows" "private-location" "status-page" "checker")+ else+ for svc in server dashboard workflows private-location status-page checker; do+ if echo "$CHANGED" | grep -q "^apps/$svc/"; then+ SERVICES_LIST+=("$svc")+ fi+ done+ fi++ SERVICES=$(printf '%s\n' "${SERVICES_LIST[@]}" | jq -R . | jq -sc .)+ fi++ echo "services=$SERVICES" >> "$GITHUB_OUTPUT"+ echo "Building services: $SERVICES"+build-and-push:runs-on: ubuntu-latest+ needs: [prepare]+ if: needs.prepare.outputs.services != '[]'+ timeout-minutes: 30permissions:contents: readid-token: writepackages: write-+strategy:+ fail-fast: falsematrix:- service: [server, dashboard, workflows, private-location, status-page, checker]+ service: ${{ fromJson(needs.prepare.outputs.services) }}include:- service: servercontext: .dockerfile: apps/server/Dockerfile- port: 3001- service: dashboardcontext: .dockerfile: apps/dashboard/Dockerfile- port: 3002- service: workflowscontext: .dockerfile: apps/workflows/Dockerfile- port: 3000- service: private-locationcontext: apps/private-locationdockerfile: apps/private-location/Dockerfile- port: 8081- service: status-pagecontext: .dockerfile: apps/status-page/Dockerfile- port: 3003- service: checkercontext: apps/checkerdockerfile: apps/checker/Dockerfile- port: 8082steps:- name: Checkout repository@@ -83,16 +123,16 @@ jobs:id: metauses: docker/metadata-action@v5with:- images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${{ matrix.service }}+ images: ${{ env.REGISTRY }}/${{ env.OWNER_LC }}/${{ env.IMAGE_NAME }}-${{ matrix.service }}tags: |- type=ref,event=branch,suffix=-${{ matrix.service }}- type=ref,event=pr,suffix=-${{ matrix.service }}- type=sha,prefix={{branch}}-,suffix=-${{ matrix.service }}- type=raw,value=latest,enable={{is_default_branch}},suffix=-${{ matrix.service }}+ type=ref,event=branch+ type=ref,event=pr+ type=sha,prefix=+ type=raw,value=latest,enable={{is_default_branch}}- name: Build and push Docker imageid: build- uses: docker/build-push-action@v5+ uses: docker/build-push-action@v6with:context: ${{ matrix.context }}file: ${{ matrix.dockerfile }}