Skip to content

Commit 36fd753

Browse files
committed
fix: Updating workflow tagging for correct branch context
Signed-off-by: S3B4SZ17 <[email protected]>
1 parent 3e340a4 commit 36fd753

File tree

4 files changed

+18
-31
lines changed

4 files changed

+18
-31
lines changed

.github/workflows/helm_test.yaml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,9 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24-
set-charts:
25-
# Required permissions
26-
permissions:
27-
contents: read
28-
pull-requests: read
29-
outputs:
30-
charts: ${{ steps.charts.outputs.changes }}
31-
name: "Set Charts"
32-
runs-on: [ubuntu-latest]
33-
steps:
34-
- uses: actions/checkout@v4
35-
- uses: dorny/paths-filter@v2
36-
id: charts
37-
with:
38-
base: ${{ github.ref_name }}
39-
filters: |
40-
sysdig-mcp:
41-
- 'charts/sysdig-mcp/**'
4224
lint-charts:
43-
needs: set-charts
4425
name: Lint new helm charts
4526
runs-on: [ubuntu-latest]
46-
strategy:
47-
matrix:
48-
chart: ${{ fromJSON(needs.set-charts.outputs.charts) }}
49-
# When set to true, GitHub cancels all in-progress jobs if any matrix job fails.
50-
fail-fast: false
51-
# The maximum number of jobs that can run simultaneously
52-
max-parallel: 3
5327
steps:
5428

5529
- uses: actions/checkout@v4
@@ -82,9 +56,9 @@ jobs:
8256
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts
8357

8458
- name: Create kind cluster
85-
if: steps.list-changed.outputs.changed == 'true'
59+
if: steps.list-changed.outputs.changed == 'true' || github.ref_name == 'main'
8660
uses: helm/[email protected]
8761

8862
- name: Run chart-testing (install)
89-
if: steps.list-changed.outputs.changed == 'true'
63+
if: steps.list-changed.outputs.changed == 'true' || github.ref_name == 'main'
9064
run: ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
- main
88
- beta
99
paths:
10+
- '.github/workflows/**'
1011
- pyproject.toml
1112
- Dockerfile
1213
- '*.py'
1314
- tests/**
1415
- tools/**
1516
- utils/**
16-
workflow_dispatch:
1717

1818
concurrency:
1919
group: 'publish-${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
@@ -100,7 +100,7 @@ jobs:
100100
TAG_CONTEXT: 'repo'
101101
WITH_V: true
102102
PRERELEASE_SUFFIX: "beta"
103-
PRERELEASE: ${{ (github.base_ref == 'beta') && 'true' || (github.base_ref == 'main') && 'false' || (github.base_ref == 'integration') && 'false' || 'true' }}
103+
PRERELEASE: ${{ (github.base_ref || github.ref_name == 'beta') && 'true' || ((github.base_ref || github.ref_name == 'main') && 'false' || 'true') }}
104104

105105
- name: Summary
106106
run: |

.github/workflows/test.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ jobs:
6565
TAG=v$(grep 'version =' pyproject.toml | sed -e 's/version = "\(.*\)"/\1/')
6666
echo "TAG=$TAG" >> "$GITHUB_OUTPUT"
6767
68+
- name: Get branch ref name
69+
id: branch_ref
70+
run: |
71+
BRANCH_NAME=${{ github.base_ref || github.ref_name }}
72+
echo "$BRANCH_NAME"
73+
echo "BRANCH_NAME=$BRANCH_NAME" >> "$GITHUB_OUTPUT"
74+
6875
- name: Get tag version
6976
id: semantic_release
7077
uses: anothrNick/[email protected]
@@ -74,7 +81,7 @@ jobs:
7481
TAG_CONTEXT: 'repo'
7582
WITH_V: true
7683
PRERELEASE_SUFFIX: "beta"
77-
PRERELEASE: ${{ (github.base_ref == 'beta') && 'true' || (github.base_ref == 'main') && 'false' || (github.base_ref == 'integration') && 'false' || 'true' }}
84+
PRERELEASE: ${{ (github.base_ref || github.ref_name == 'beta') && 'true' || (((github.base_ref || github.ref_name == 'main') && 'false' || (github.base_ref || github.ref_name == 'integration') && 'false') || 'true') }}
7885
DRY_RUN: true
7986

8087
- name: Compare versions

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# MCP Server
22

3+
| App Test | Helm Test |
4+
|------|---------|
5+
| [![App Test](https://github.com/sysdiglabs/sysdig-mcp-server/actions/workflows/publish.yaml/badge.svg?branch=main)](https://github.com/sysdiglabs/sysdig-mcp-server/actions/workflows/publish.yaml) | [![Helm Test](https://github.com/sysdiglabs/sysdig-mcp-server/actions/workflows/helm_test.yaml/badge.svg?branch=main)](https://github.com/sysdiglabs/sysdig-mcp-server/actions/workflows/helm_test.yaml) |
6+
7+
---
8+
39
## Table of contents
410

511
- [MCP Server](#mcp-server)

0 commit comments

Comments
 (0)