Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
paths:
- pyproject.toml
- Dockerfile
- '*.py'
- "*.py"
- tests/**
- tools/**
- utils/**
workflow_call:
workflow_dispatch:

concurrency:
group: 'tests-${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: "tests-${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.sha }} # required for better experience using pre-releases
fetch-depth: '0' # Required due to the way Git works, without it this action won't be able to find any or the correct tags
fetch-depth: "0" # Required due to the way Git works, without it this action won't be able to find any or the correct tags

- name: Extract current version
id: pyproject_version
Expand All @@ -78,7 +78,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: "patch"
TAG_CONTEXT: 'repo'
TAG_CONTEXT: "repo"
WITH_V: true
DRY_RUN: true

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/test_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Test Image Build

on:
pull_request:
paths:
- pyproject.toml
- Dockerfile
- "*.py"
- tests/**
- tools/**
- utils/**
- .github/workflows/**
workflow_call:
workflow_dispatch:

concurrency:
group: "test-image-${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
test_build:
name: Test Build
runs-on: ubuntu-latest
permissions:
contents: read # required for actions/checkout
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
ref: ${{ github.sha }} # required for better experience using pre-releases
fetch-depth: "0" # Required due to the way Git works, without it this action won't be able to find any or the correct tags

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
id: build-to-test
uses: docker/build-push-action@v5
with:
context: .
load: true
push: false
tags: |
ghcr.io/sysdiglabs/sysdig-mcp-server:test

- name: Scan Docker image
uses: sysdiglabs/scan-action@v6
with:
image-tag: ghcr.io/sysdiglabs/sysdig-mcp-server:test
sysdig-secure-token: ${{ secrets.KUBELAB_SECURE_API_TOKEN }}
stop-on-failed-policy-eval: true
stop-on-processing-error: true