Skip to content

Commit 657972d

Browse files
committed
feat: something nice #release
1 parent f2d23ab commit 657972d

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: CI (Build & Push Docker + Auto Release)
44
on:
55
push:
66
branches: [ "main" ]
7-
tags: [ "v*.*.*", "*.*.*" ] # supports v2.0.1 or 2.0.1
7+
tags: [ "v*.*.*", "*.*.*" ]
88
workflow_dispatch: {}
99

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

1515
permissions:
16-
contents: write # needed to push tags & create releases
16+
contents: write
1717

1818
jobs:
1919
build-and-push:
@@ -44,24 +44,18 @@ jobs:
4444
uses: docker/metadata-action@v5
4545
with:
4646
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
47-
# Only SemVer on tag events; latest/branch/sha on main pushes
47+
# 👇 build ONLY the right tags for each event type
4848
tags: |
4949
type=semver,pattern={{version}},enable=${{ github.ref_type == 'tag' }}
5050
type=raw,value=latest,enable=${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
5151
type=ref,event=branch,enable=${{ github.ref_type == 'branch' }}
52-
type=sha,enable=${{ github.ref_type == 'branch' }}
5352
labels: |
5453
org.opencontainers.image.title=${{ github.event.repository.name }}
5554
org.opencontainers.image.source=${{ github.repository }}
5655
org.opencontainers.image.revision=${{ github.sha }}
5756
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 }}"
57+
- name: Debug tags
58+
run: echo "${{ steps.meta.outputs.tags }}"
6559

6660
- name: Build & Push (linux/amd64 + linux/arm64)
6761
uses: docker/build-push-action@v6
@@ -84,7 +78,7 @@ jobs:
8478
- name: Checkout
8579
uses: actions/checkout@v4
8680
with:
87-
fetch-depth: 0 # need full history for tags
81+
fetch-depth: 0
8882

8983
- name: Bump patch version and create tag
9084
id: bump
@@ -99,15 +93,4 @@ jobs:
9993
git config user.name "github-actions[bot]"
10094
git config user.email "github-actions[bot]@users.noreply.github.com"
10195
git tag -a "$NEW_TAG" -m "release $NEW_TAG"
102-
git push origin "$NEW_TAG"
103-
echo "tag=$NEW_TAG" >> $GITHUB_OUTPUT
104-
105-
- name: Create GitHub Release
106-
uses: softprops/action-gh-release@v2
107-
with:
108-
tag_name: ${{ steps.bump.outputs.tag }}
109-
name: Release ${{ steps.bump.outputs.tag }}
110-
body: |
111-
🚀 Automated release from CI.
112-
env:
113-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
git push origin "$NEW_TAG"

main_demo_released.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def calc_savings(tokens_est: int, price_in: float, price_out: float, frac_in: fl
595595
<div class="app-header">
596596
<div class="brand">
597597
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/Redis_logo.svg/2560px-Redis_logo.svg.png" alt="Redis">
598-
<div class="title">Redis LangCache — Demo PT-BR - SemVer: v2.0.3 - PR GitHub: gacerioni</div>
598+
<div class="title">Redis LangCache — Demo PT-BR - SemVer: v2.0.4 - PR GitHub: gacerioni</div>
599599
</div>
600600
<div class="links">
601601
<a href="https://www.linkedin.com/in/gabrielcerioni/" target="_blank" rel="noopener">💼 LinkedIn do Gabs</a>

0 commit comments

Comments
 (0)