Skip to content

Commit 84bb226

Browse files
author
Kavindu Perera
committed
Refactor docker-build.yml to streamline tag verification and deployment process
1 parent d2ab5ac commit 84bb226

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,11 @@ jobs:
2727
- name: Verify tag is on release branch
2828
id: verify
2929
run: |
30-
# Fetch all remote branches to ensure we can check which branches contain this tag
3130
git fetch --all
3231
33-
# Get all branches containing this tag
3432
BRANCHES=$(git branch -r --contains ${{ github.ref_name }})
3533
echo "Branches containing tag: $BRANCHES"
3634
37-
# Check if any branch matches release/* pattern
3835
if echo "$BRANCHES" | grep -q "origin/release/"; then
3936
echo "Tag is on a release branch"
4037
echo "proceed=true" >> $GITHUB_OUTPUT
@@ -62,10 +59,7 @@ jobs:
6259
with:
6360
images: ghcr.io/${{ github.repository_owner }}/velocity-renderer
6461
tags: |
65-
# Set version tag (strips 'v' prefix automatically for semver)
6662
type=semver,pattern={{version}}
67-
# Set latest tag for release branches
68-
type=raw,value=latest
6963
labels: |
7064
org.opencontainers.image.title=Velocity Renderer
7165
org.opencontainers.image.description=Spring Boot + Vaadin application for Apache Velocity template rendering
@@ -119,13 +113,11 @@ jobs:
119113

120114
- name: Deploy to Fly.io
121115
run: |
122-
# Check if app exists, create if it doesn't
123116
if ! flyctl apps list | grep -q "velocity-renderer"; then
124117
echo "App doesn't exist, creating..."
125118
flyctl apps create velocity-renderer --org personal
126119
fi
127120
128-
# Deploy using the version from build job
129121
flyctl deploy --image ghcr.io/${{ github.repository_owner }}/velocity-renderer:${{ needs.build-and-push.outputs.version }}
130122
131123
echo "✅ Successfully deployed to Fly.io"

0 commit comments

Comments
 (0)