Skip to content

Commit 2241e02

Browse files
Merge pull request #3 from XyLearningProgramming/fix/cov
🐛 added a slug env for codecov
2 parents 91cc1bd + a3800ad commit 2241e02

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.github/workflows/cd.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,18 @@ jobs:
6666
type=gha,mode=max
6767
type=registry,ref=${{ secrets.REGISTRY_REPOSITORY }}:buildcache,mode=max
6868
69+
- name: Extract SHA-suffixed tag
70+
id: extract_tag
71+
run: |
72+
# Find the tag with SHA suffix (format: branch-sha)
73+
TAGS='${{ steps.meta.outputs.tags }}'
74+
SHA_TAG=$(echo "$TAGS" | grep -E '.*-[a-f0-9]{7}$' | head -1 | cut -d':' -f2)
75+
echo $SHA_TAG >> $GITHUB_OUTPUT
76+
6977
- name: Deploy with Helm
7078
uses: ./.github/actions/helm-deploy
7179
with:
72-
image_tag: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
80+
image_tag: ${{ steps.extract_tag.outputs.tag }}
7381
registry_repository: ${{ secrets.REGISTRY_REPOSITORY }}
7482
kube_config_data: ${{ secrets.KUBE_CONFIG_DATA }}
7583
helm_values_env: ${{ secrets.HELM_VALUES_ENV }}

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
flags: unittests
4343
fail_ci_if_error: false
4444
token: ${{ secrets.CODECOV_TOKEN }}
45+
slug: XyLearningProgramming/slm_server
4546

4647
- name: Lint with ruff
4748
run: |

deploy/helm/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,6 @@ spec:
8181
- name: scripts
8282
configMap:
8383
name: {{ include "slm-server.fullname" . }}-scripts
84-
defaultMode: 0755
84+
defaultMode: 0755
85+
strategy:
86+
{{- toYaml .Values.strategy | nindent 4 }}

deploy/helm/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,6 @@ probes:
105105
timeoutSeconds: 5
106106
successThreshold: 1
107107
failureThreshold: 3
108+
109+
strategy:
110+
type: Recreate

0 commit comments

Comments
 (0)