Skip to content

Commit 6c94415

Browse files
committed
Testing Harness CD
1 parent febcacf commit 6c94415

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: CI (Build & Push Docker)
44
on:
55
push:
66
branches: [ "main" ]
7-
tags: [ "v*.*.*" ]
7+
tags: [ "v*.*.*" ] # allow v2.0.1 or 2.0.1 (keep only the one you use)
88
workflow_dispatch: {}
99

1010
env:
@@ -13,7 +13,7 @@ env:
1313
DOCKERFILE: ./Dockerfile
1414

1515
permissions:
16-
contents: read # no write permissions needed
16+
contents: read
1717

1818
jobs:
1919
build-and-push:
@@ -44,16 +44,25 @@ jobs:
4444
uses: docker/metadata-action@v5
4545
with:
4646
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
47+
# Only SemVer on tag events; only latest/branch/sha on branch events
4748
tags: |
48-
type=sha
49-
type=ref,event=branch
50-
type=raw,value=latest,enable={{is_default_branch}}
51-
type=semver,pattern={{version}}
49+
type=semver,pattern={{version}},enable=${{ github.ref_type == 'tag' }}
50+
type=raw,value=latest,enable=${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
51+
type=ref,event=branch,enable=${{ github.ref_type == 'branch' }}
52+
type=sha,enable=${{ github.ref_type == 'branch' }}
5253
labels: |
5354
org.opencontainers.image.title=${{ github.event.repository.name }}
5455
org.opencontainers.image.source=${{ github.repository }}
5556
org.opencontainers.image.revision=${{ github.sha }}
5657
58+
- name: Debug tags & labels
59+
run: |
60+
echo "TAGS:"
61+
echo "${{ steps.meta.outputs.tags }}"
62+
echo
63+
echo "LABELS:"
64+
echo "${{ steps.meta.outputs.labels }}"
65+
5766
- name: Build & Push (linux/amd64 + linux/arm64)
5867
uses: docker/build-push-action@v6
5968
with:

main_demo_released.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def calc_savings(tokens_est: int, price_in: float, price_out: float, frac_in: fl
587587
"""
588588

589589
# ============== APP (layout preservado A/B) ==============
590-
with gr.Blocks(title="Redis LangCache — Demo PT-BR", css=CUSTOM_CSS, elem_id="app-root") as demo:
590+
with gr.Blocks(title="Redis LangCache — Demo PT-BR - SemVer: 2.0.2", css=CUSTOM_CSS, elem_id="app-root") as demo:
591591
st = gr.State({"hits": 0, "misses": 0, "saved_tokens": 0, "saved_usd": 0.0, "history": []})
592592

593593
# Header com logo + links

0 commit comments

Comments
 (0)