Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 9 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@ jobs:
type=gha,mode=max
type=registry,ref=${{ secrets.REGISTRY_REPOSITORY }}:buildcache,mode=max

- name: Extract SHA-suffixed tag
id: extract_tag
run: |
# Find the tag with SHA suffix (format: branch-sha)
TAGS='${{ steps.meta.outputs.tags }}'
SHA_TAG=$(echo "$TAGS" | grep -E '.*-[a-f0-9]{7}$' | head -1 | cut -d':' -f2)
echo $SHA_TAG >> $GITHUB_OUTPUT

- name: Deploy with Helm
uses: ./.github/actions/helm-deploy
with:
image_tag: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
image_tag: ${{ steps.extract_tag.outputs.tag }}
registry_repository: ${{ secrets.REGISTRY_REPOSITORY }}
kube_config_data: ${{ secrets.KUBE_CONFIG_DATA }}
helm_values_env: ${{ secrets.HELM_VALUES_ENV }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
flags: unittests
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
slug: XyLearningProgramming/slm_server

- name: Lint with ruff
run: |
Expand Down
4 changes: 3 additions & 1 deletion deploy/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,6 @@ spec:
- name: scripts
configMap:
name: {{ include "slm-server.fullname" . }}-scripts
defaultMode: 0755
defaultMode: 0755
strategy:
{{- toYaml .Values.strategy | nindent 4 }}
3 changes: 3 additions & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ probes:
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3

strategy:
type: Recreate
Loading