# CI/CD Status Badges This document provides badge examples for different CI/CD platforms and code quality services. ## Gitea (Primary Platform) ```markdown [![Build Status](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach) [![Pipeline Status](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/pipeline.svg)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach/-/pipelines) ``` **Configuration Notes:** - **Organization**: `arcodange` - **Repository**: `DanceLessonsCoach` - **Internal URL** (for CI/CD scripts): `https://gitea.arcodange.lab/` - **External URL** (for public badges): `https://gitea.arcodange.fr/` - **SSH URL**: `ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git` - **Badge API**: Uses external domain with full org/repo path - **CI/CD Configuration**: Uses internal domain for faster network access ## GitHub Mirror ```markdown [![GitHub CI](https://github.com/yourorg/DanceLessonsCoach/actions/workflows/main.yml/badge.svg)](https://github.com/yourorg/DanceLessonsCoach/actions) [![GitHub Issues](https://img.shields.io/github/issues/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/issues) [![GitHub Stars](https://img.shields.io/github/stars/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/stargazers) [![GitHub License](https://img.shields.io/github/license/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/LICENSE) ``` **Replace** `yourorg` with your actual GitHub organization/user name. ## GitLab Mirror ```markdown [![GitLab CI](https://gitlab.com/yourorg/DanceLessonsCoach/badges/main/pipeline.svg)](https://gitlab.com/yourorg/DanceLessonsCoach/-/pipelines) [![GitLab Coverage](https://gitlab.com/yourorg/DanceLessonsCoach/badges/main/coverage.svg)](https://gitlab.com/yourorg/DanceLessonsCoach/-/commits/main) ``` **Replace** `yourorg` with your actual GitLab organization/user name. ## Code Quality Badges ### Go Report Card ```markdown [![Go Report Card](https://goreportcard.com/badge/github.com/yourorg/DanceLessonsCoach)](https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach) ``` ### Code Coverage (Codecov) ```markdown [![Code Coverage](https://codecov.io/gh/yourorg/DanceLessonsCoach/branch/main/graph/badge.svg)](https://codecov.io/gh/yourorg/DanceLessonsCoach) ``` ### Code Climate ```markdown [![Code Climate](https://codeclimate.com/github/yourorg/DanceLessonsCoach/badges/gpa.svg)](https://codeclimate.com/github/yourorg/DanceLessonsCoach) [![Issue Count](https://codeclimate.com/github/yourorg/DanceLessonsCoach/badges/issue_count.svg)](https://codeclimate.com/github/yourorg/DanceLessonsCoach) ``` ## Version Badges ```markdown [![Version](https://img.shields.io/github/v/release/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/releases/latest) [![Release Date](https://img.shields.io/github/release-date/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/releases/latest) [![Go Version](https://img.shields.io/github/go-mod/go-version/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/go.mod) ``` ## Combined Badge Example Here's how to combine multiple badges in your README: ```markdown # DanceLessonsCoach [![Build Status](https://ci.your-gitea-instance.com/api/badges/project/status)](https://ci.your-gitea-instance.com) [![GitHub CI](https://github.com/yourorg/DanceLessonsCoach/actions/workflows/main.yml/badge.svg)](https://github.com/yourorg/DanceLessonsCoach/actions) [![GitLab CI](https://gitlab.com/yourorg/DanceLessonsCoach/badges/main/pipeline.svg)](https://gitlab.com/yourorg/DanceLessonsCoach/-/pipelines) [![Go Report Card](https://goreportcard.com/badge/github.com/yourorg/DanceLessonsCoach)](https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach) [![Code Coverage](https://codecov.io/gh/yourorg/DanceLessonsCoach/branch/main/graph/badge.svg)](https://codecov.io/gh/yourorg/DanceLessonsCoach) [![Version](https://img.shields.io/github/v/release/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/releases/latest) [![Go Version](https://img.shields.io/github/go-mod/go-version/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/go.mod) [![License](https://img.shields.io/github/license/yourorg/DanceLessonsCoach.svg)](https://github.com/yourorg/DanceLessonsCoach/blob/main/LICENSE) ``` ## Setup Instructions ### For Gitea (Arcodange Configuration) ```bash # 1. Configure CI/CD runners to use INTERNAL URL export GITEA_URL="https://gitea.arcodange.lab/" export GITEA_ORG="arcodange" export GITEA_REPO="DanceLessonsCoach" # 2. Enable GitHub Actions compatibility in repo settings # - Go to: https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/settings/actions # - Enable GitHub Actions # - Configure runner to use internal network (192.168.1.202) # 3. Workflow files are in .gitea/workflows/ (not .github/workflows/) # - Main workflow: .gitea/workflows/ci-cd.yaml # - Follows Arcodange conventions from webapp workflow # 4. Use EXTERNAL URL for public badges # - Badge API: https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status # - Public access: https://gitea.arcodange.fr/arcodange/DanceLessonsCoach # - SSH access: ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git ``` ### For CI/CD Configuration Files ```yaml # .github/workflows/main.yml # Arcodange-specific environment variables env: GITEA_INTERNAL: "https://gitea.arcodange.lab/" GITEA_EXTERNAL: "https://gitea.arcodange.fr/" GITEA_ORG: "arcodange" GITEA_REPO: "DanceLessonsCoach" GITEA_SSH: "ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git" ``` ### For Badge Usage ```markdown # Always use EXTERNAL URL with full org/repo path for badges in README [![Build Status](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach) [![Pipeline](https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/pipeline.svg)](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach/-/pipelines) ``` ### For GitHub 1. Enable GitHub Actions on your mirror repository 2. Badges will automatically work with the provided URLs 3. Configure branch protection rules as needed ### For GitLab 1. Create a `.gitlab-ci.yml` file (can convert from GitHub Actions) 2. Enable pipeline badges in GitLab CI/CD settings 3. Use the provided badge URLs ### For External Services 1. **Go Report Card**: Just visit https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach 2. **Codecov**: Sign up at codecov.io and integrate with your repository 3. **Code Climate**: Sign up and add your repository ## Badge Customization You can customize badge appearance using shield.io parameters: ```markdown [![Custom Badge](https://img.shields.io/badge/custom-message-blue?style=flat&logo=go)](https://example.com) ``` **Style options:** `flat`, `flat-square`, `plastic`, `for-the-badge`, `social` **Color options:** Any hex color or named color (blue, green, red, etc.) **Logo options:** Add `?logo=go`, `?logo=github`, etc. ## Troubleshooting ### Badges not updating - Check if CI/CD pipelines are running successfully - Verify badge URLs are correct - Ensure your repository is public (for external services) - Check for caching issues (add cache buster if needed) ### Broken badge links - Verify the platform URLs are correct - Check repository visibility settings - Ensure CI/CD is properly configured - Test badge URLs in browser first ## References - [Shields.io Badge Documentation](https://shields.io/) - [GitHub Actions Badges](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge) - [GitLab CI/CD Badges](https://docs.gitlab.com/ee/ci/pipelines/settings.html#pipeline-status-badges) - [Gitea Actions Documentation](https://docs.gitea.com/next/usage/actions/) - [Go Report Card](https://goreportcard.com/) - [Codecov Documentation](https://docs.codecov.com/) --- **Note:** Replace all placeholder URLs (`yourorg`, `your-gitea-instance.com`) with your actual repository and instance information.