|
5 | 5 | push: |
6 | 6 | branches: |
7 | 7 | - main |
| 8 | + - beta |
8 | 9 | paths: |
9 | 10 | - pyproject.toml |
10 | 11 | - Dockerfile |
|
15 | 16 | workflow_dispatch: |
16 | 17 |
|
17 | 18 | concurrency: |
18 | | - group: '${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' |
| 19 | + group: 'publish-${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' |
19 | 20 | cancel-in-progress: true |
20 | 21 |
|
21 | 22 | jobs: |
|
44 | 45 | - name: Extract version |
45 | 46 | id: extract_version |
46 | 47 | run: | |
47 | | - VERSION=$(grep 'version =' pyproject.toml | sed -e 's/version = "\(.*\)"/\1/')-$(echo $GITHUB_SHA | cut -c1-7) |
| 48 | + VERSION=$(grep 'version =' pyproject.toml | sed -e 's/version = "\(.*\)"/\1/') |
48 | 49 | echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" |
49 | 50 | TAG=v$(grep 'version =' pyproject.toml | sed -e 's/version = "\(.*\)"/\1/') |
50 | 51 | echo "TAG=$TAG" >> "$GITHUB_OUTPUT" |
@@ -84,23 +85,34 @@ jobs: |
84 | 85 | runs-on: ubuntu-latest |
85 | 86 | needs: push_to_registry |
86 | 87 | steps: |
87 | | - - name: Check out the repo |
| 88 | + - name: Check out repository |
88 | 89 | uses: actions/checkout@v4 |
| 90 | + with: |
| 91 | + ref: ${{ github.sha }} # required for better experience using pre-releases |
| 92 | + 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 |
89 | 93 |
|
90 | 94 | - name: Get tag version |
91 | 95 | id: semantic_release |
92 | | - uses: anothrNick/github-tag-action@1.73.0 |
| 96 | + uses: anothrNick/github-tag-action@1.71.0 |
93 | 97 | env: |
94 | 98 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
95 | 99 | DEFAULT_BUMP: "patch" |
96 | | - TAG_CONTEXT: ${{ (github.base_ref != 'main') && 'branch' || 'repo' }} |
| 100 | + TAG_CONTEXT: 'repo' |
| 101 | + WITH_V: true |
97 | 102 | PRERELEASE_SUFFIX: "beta" |
98 | | - PRERELEASE: ${{ (github.base_ref != 'main') && 'true' || 'false' }} |
99 | | - DRY_RUN: false |
100 | | - INITIAL_VERSION: ${{ needs.push_to_registry.outputs.tag }} |
| 103 | + PRERELEASE: ${{ (github.base_ref == 'beta') && 'true' || (github.base_ref == 'main') && 'false' || (github.base_ref == 'integration') && 'false' || 'true' }} |
101 | 104 |
|
102 | 105 | - name: Summary |
103 | 106 | run: | |
104 | 107 | echo "## Release Summary |
105 | 108 | - Tag: ${{ steps.semantic_release.outputs.tag }} |
106 | 109 | - Docker Image: ghcr.io/sysdiglabs/sysdig-mcp-server:v${{ needs.push_to_registry.outputs.version }}" >> $GITHUB_STEP_SUMMARY |
| 110 | +
|
| 111 | + test_helm_chart: |
| 112 | + name: Test Helm Chart |
| 113 | + needs: push_to_registry |
| 114 | + permissions: |
| 115 | + contents: read # required for actions/checkout |
| 116 | + pull-requests: write # required for creating a PR with the chart changes |
| 117 | + uses: ./.github/workflows/helm_test.yaml |
| 118 | + secrets: inherit |
0 commit comments