-
Notifications
You must be signed in to change notification settings - Fork 0
Develop Branch Workflow
A dedicated CI/CD workflow has been created for the develop branch that builds and tags Docker images as :develop for testing purposes.
File: .github/workflows/docker-build-develop.yml
Purpose: Build and publish development images for testing
Triggers:
- Push to
developbranch - Changes to
app/**orinfrastructure/** - Manual workflow dispatch
Result: Pushes ryakel/flight-budget:develop to Docker Hub
File: .github/workflows/docker-build.yml
Changes:
- β Removed
developmentbranch trigger - β Removed dev tag logic
- β
Now only handles
mainbranch and manual tags - β Cleaner separation of concerns
Workflow: docker-build.yml
Builds:
ryakel/flight-budget:latest-
ryakel/flight-budget:v1.2.3(semantic version)
Features:
- β Semantic versioning
- β GitHub releases
- β Docker Hub description sync
- β Portainer webhook
Workflow: docker-build-develop.yml
Builds:
-
ryakel/flight-budget:develop(always overwrites)
Features:
- β Multi-platform builds
- β No versioning
- β No releases
- β No webhook
# 1. Create feature branch from develop
git checkout develop
git pull origin develop
git checkout -b feature/my-feature
# 2. Make changes
vim app/js/app.js
# 3. Commit and push to feature branch
git add .
git commit -m "feat: add my feature"
git push origin feature/my-feature
# 4. Create PR to develop (or push directly)
git checkout develop
git merge feature/my-feature
git push origin develop
# 5. GitHub Actions builds :develop tag
# View: https://github.com/ryakel/flight-budget/actions
# 6. Test the develop image
docker pull ryakel/flight-budget:develop
docker run -d -p 8181:80 ryakel/flight-budget:develop
open http://localhost:8181
# 7. When ready, merge to main
git checkout main
git merge develop
git commit -m "minor: release new features"
git push origin main
# 8. GitHub Actions builds :latest + :v1.2.3After using both branches:
ryakel/flight-budget:latest β Latest main build (production)
ryakel/flight-budget:develop β Latest develop build (testing)
ryakel/flight-budget:v1.0.0 β Semantic versions from main
ryakel/flight-budget:v1.1.0
ryakel/flight-budget:v1.2.0
# Pull latest develop image
docker pull ryakel/flight-budget:develop
# Run container
docker run -d -p 8181:80 --name test ryakel/flight-budget:develop
# Test application
open http://localhost:8181
# Check logs
docker logs test
# Cleanup
docker stop test && docker rm testCreate a separate test stack:
# docker-compose-test.yml
version: '3.8'
services:
flight-budget-test:
image: ryakel/flight-budget:develop
container_name: flight-budget-test
ports:
- "8182:80" # Different port
pull_policy: always
restart: unless-stopped| Feature | Main Workflow | Develop Workflow |
|---|---|---|
| File | docker-build.yml |
docker-build-develop.yml |
| Branch | main |
develop |
| Tag |
latest + v1.2.3
|
develop |
| Versioning | β Semantic | β None |
| GitHub Release | β Yes | β No |
| Portainer Webhook | β Yes | β No |
| Multi-Platform | β Yes | β Yes |
| Build Cache | β Yes | β Yes |
| Purpose | Production | Testing |
-
main= Production only -
develop= Testing only - Clearer workflow logic
-
:developtag always has latest development build - Easy to test before merging to main
- No need to manually tag test versions
- Development builds don't trigger production workflows
- No accidental releases from development work
- No Portainer deployments until ready
- Push to develop β test immediately
- No need to create tags or releases
- Continuous integration for development
# Single workflow for everything
on:
push:
branches:
- main
- development # β Both branches in one workflowIssues:
- Complex conditional logic
-
devvslatesttag confusion - Mixed production and development concerns
# Main workflow (production)
on:
push:
branches:
- main # β Only production
# Separate develop workflow
on:
push:
branches:
- develop # β Only testingBenefits:
- Simpler logic
- Clear separation
- Easier to maintain
Check:
- Are you pushing to
developbranch (notdevelopment)? - Did you modify files in
app/orinfrastructure/? - Is the workflow enabled?
Verify:
# Check current branch
git branch --show-current
# Check remote branches
git branch -r | grep develop
# Manually trigger
# GitHub β Actions β Docker Builder - Develop β Run workflowIssue: Image tagged as :dev instead of :develop
Solution: Check workflow file ensures tag is develop:
tags: ryakel/flight-budget:developIf you have an old development branch:
# Rename development β develop locally
git branch -m development develop
# Delete old remote branch
git push origin --delete development
# Push new develop branch
git push -u origin developUpdated files:
- β BRANCH_STRATEGY.md - Complete branch workflow guide
- β GITHUB_ACTIONS.md - Updated workflow list
- β PRE_DEPLOYMENT_CHECKLIST.md - Updated branch names
- β README.md - Added branch strategy link
cd /Users/rkelch/code/flight_budget
git checkout -b develop
git push -u origin develop# Make a test change
echo "# Test" >> README.md
git add README.md
git commit -m "test: verify develop workflow"
git push origin develop
# Watch GitHub Actions
# Should build: ryakel/flight-budget:develop# Check if :develop tag appears
docker pull ryakel/flight-budget:develop
# Should show 3 platforms:
# - linux/amd64
# - linux/arm64Going forward:
- Work on
developbranch for new features - Test using
:developimage - When ready, merge to
mainfor production release
# Day 1: Start new feature
git checkout develop
git pull origin develop
git checkout -b feature/export-pdf
# ... work on feature ...
git commit -m "feat: add PDF export"
git push origin feature/export-pdf
# Day 2: Merge to develop
git checkout develop
git merge feature/export-pdf
git push origin develop
# β Builds :develop image automatically
# Day 3: Test
docker pull ryakel/flight-budget:develop
docker run -d -p 8181:80 ryakel/flight-budget:develop
# ... test thoroughly ...
# Day 4: Ship to production
git checkout main
git pull origin main
git merge develop
git commit -m "minor: add PDF export feature"
git push origin main
# β Builds :latest + :v1.2.0
# β Creates GitHub Release
# β Triggers Portainer webhook
# β Production deployed! π- β
Dedicated
developbranch workflow - β
Builds
ryakel/flight-budget:developtag - β Multi-platform support (amd64, arm64)
- β No versioning (always overwrites)
- β Separate from production workflow
- β Main workflow simplified (no more development branch)
- β Cleaner separation between testing and production
- β Documentation updated
- β Ready to use
- β No secrets needed (uses same DOCKER_USERNAME/TOKEN)
- β
Works immediately after creating
developbranch
Created: 2025-11-27
Status: Active
Branch: develop
Docker Tag: ryakel/flight-budget:develop
Workflow: .github/workflows/docker-build-develop.yml
π View on GitHub | π³ Docker Hub
π Report Issue | π¬ Discussions
License: MIT License | Copyright (c) 2024-2025 FliteAxis
π Getting Started
π¦ Deployment
π§ Development
π Security
- Security Setup Guide
- Security CI/CD Pipeline
- Code Quality & Linting
- SBOM Management
- Vulnerability Scanning
π Dependencies
π³ Docker
π Reference
π Links