diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4aa930117b..e751018cfc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,6 +7,7 @@ on: pull_request: branches: [main] workflow_dispatch: + permissions: actions: read contents: read @@ -15,6 +16,7 @@ permissions: pull-requests: write security-events: write issues: write + jobs: test-image: runs-on: ubuntu-latest @@ -32,8 +34,9 @@ jobs: PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} run: | make test-image IMAGE_NAMESPACE=${{ github.repository }} PLATFORM=linux/amd64 + - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: coverage-files - path: ./coverage* + path: ./output/coverage* diff --git a/Makefile b/Makefile index 14db13ab96..190c04f098 100644 --- a/Makefile +++ b/Makefile @@ -241,6 +241,7 @@ container-docker: buildx # util target to build container images using docker bu image_metadata_filename="image-metadata-$$image_name-$(TAG).json"; \ touch $$image_metadata_filename; \ echo "Building $$image_name for $$os/$$arch "; \ + mkdir -p $(OUTPUT_DIR); \ docker buildx build \ --platform $(PLATFORM) \ --metadata-file=$$image_metadata_filename \ @@ -253,6 +254,7 @@ container-docker: buildx # util target to build container images using docker bu --build-arg VERSION=$(VERSION) $(EXTRA_BUILD_ARGS) \ --target=$(TARGET) \ -t $(IMAGE_REGISTRY)/$(IMAGE):$(TAG) \ + --output type=local,dest=$(OUTPUT_DIR) \ $(BUILDX_ACTION) \ $(CONTEXT_DIR) diff --git a/test/image/Dockerfile b/test/image/Dockerfile index 8c681a3fee..9d5dd44627 100644 --- a/test/image/Dockerfile +++ b/test/image/Dockerfile @@ -4,7 +4,7 @@ FROM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb ENV CGO_ENABLED=0 COPY . /go/src/github.com/microsoft/retina WORKDIR /go/src/github.com/microsoft/retina -RUN tdnf install -y clang16 lld16 bpftool libbpf-devel make git +RUN tdnf install -y clang16 lld16 bpftool libbpf-devel make git jq RUN go generate /go/src/github.com/microsoft/retina/pkg/plugin/... # RUN go mod edit -module retina # RUN make all generate