diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index cc3c4694..4df15831 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -28,31 +28,17 @@ jobs: platforms: linux/${{ matrix.platform }} dockerfile_path: './Dockerfile' build_args: TASKBROKER_GIT_REVISION=${{ github.sha }} - ghcr: ${{ github.event.pull_request.head.repo.fork == false }} + ghcr: true tag_suffix: -${{ matrix.platform }} publish_on_pr: true google_ar: false tag_nightly: false tag_latest: false - tags: ${{ github.event_name == 'pull_request' && 'ghcr.io/getsentry/taskbroker:nightly' || ''}} - outputs: ${{ github.event_name == 'pull_request' && 'type=docker' || ''}} - - - name: Save Docker image to artifact - if: ${{ github.event_name == 'pull_request' }} - run: docker save -o /tmp/taskbroker.tar ghcr.io/getsentry/taskbroker:nightly - - - name: Upload artifact for self-hosted e2e - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: ${{ github.event_name == 'pull_request' }} - with: - name: taskbroker-${{ matrix.platform }} - path: /tmp/taskbroker.tar - if-no-files-found: error - retention-days: 1 assemble-taskbroker-image: runs-on: ubuntu-latest needs: [build] + if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }} permissions: contents: read packages: write @@ -67,7 +53,6 @@ jobs: uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Create multiplatform manifests - if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }} run: | docker buildx imagetools create \ --tag ghcr.io/getsentry/taskbroker:${{ github.event.pull_request.head.sha || github.sha }} \ @@ -106,19 +91,6 @@ jobs: timeout-minutes: 30 steps: - - name: Download artifact for pull request - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - if: ${{ github.event_name == 'pull_request' }} - with: - name: taskbroker-amd64 - path: /tmp/ - - - name: Load Docker image from tar file - if: ${{ github.event_name == 'pull_request' }} - run: | - docker image load --input /tmp/taskbroker.tar - docker image tag ghcr.io/getsentry/taskbroker:nightly ghcr.io/getsentry/taskbroker:${{ github.sha }} - - name: Run Sentry self-hosted e2e CI uses: getsentry/self-hosted@master with: diff --git a/Dockerfile b/Dockerfile index 2847a419..125447c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # recent enough version of protobuf-compiler FROM rust:1-bookworm AS build -RUN apt-get update && apt-get upgrade -y +RUN apt-get update && apt-get upgrade -y RUN apt-get install -y cmake pkg-config libssl-dev librdkafka-dev protobuf-compiler RUN USER=root cargo new --bin taskbroker