This repository contains several reusable workflows designed to streamline the CI/CD process. The workflows aim to automate tasks such as testing, deployment, pull request management, and code quality checks.
- Purpose: Manages the deployment of technical documentation using Backstage TechDocs.
- Purpose: Runs integration tests for ensuring code stability.
- Purpose: Automates actions based on pull request events such as title validation, code coverage reports, and testing.
- Purpose: Integrates with SonarCloud for analyzing code quality and vulnerabilities.
- Purpose: Manages deployments to various environments based on the branch being deployed.
- Purpose: Manages the execution of Kover, a Kotlin coverage engine, for code coverage on pull requests.
- Purpose: Automates the process of merging pull requests and triggering subsequent deployment steps for
staging
andproduction
.
- Purpose: Automatically tags releases with a timestamped version.
- Purpose: Automatically creates a pull request to promote changes from
develop
tostaging
.
- Purpose: Automatically creates a pull request for promoting changes to the
production
branch.
This workflow is triggered by pushes to the develop
branch. It automatically creates a pull request to promote changes to the staging
branch using the staging-pr.yaml
workflow.
Example:
name: Auto-create PR to promote develop to staging
on:
push:
branches:
- develop
jobs:
staging_pr:
name: Pull request (Staging)
uses: monta-app/github-workflows/.github/workflows/staging-pr.yaml@v2
This workflow listens for comments on pull requests and responds to specific commands.
It handles automatic PR merging, staging deployment, production pull request creation, tagging, and deployment based on the command /monta-merge
.
Example:
name: Release Workflow Automation
on:
issue_comment:
types:
- created
jobs:
monta-merge:
name: auto-merge release pull request
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/monta-merge') }}
uses: monta-app/github-workflows/.github/workflows/monta-merge-command.yaml@v2
secrets: inherit
trigger-staging-deploy:
needs: monta-merge
if: ${{ needs.monta-merge.outputs.base_branch == 'staging' }}
# Update this to your deployment workflow, and ensure it runs on workflow_call
uses: ./.github/workflows/deploy_staging.yaml
secrets: inherit
trigger-production-pr-creation:
needs: monta-merge
if: ${{ needs.monta-merge.outputs.base_branch == 'staging' }}
uses: monta-app/github-workflows/.github/workflows/production-pr.yaml@v2
secrets: inherit
trigger-production-tag-release:
needs: monta-merge
if: ${{ needs.monta-merge.outputs.base_branch == 'main' }}
uses: monta-app/github-workflows/.github/workflows/release-tag.yaml@v2
secrets: inherit
trigger-production-deploy:
needs: trigger-production-tag-release
# Update this to your deployment workflow, and ensure it runs on workflow_call
uses: ./.github/workflows/deploy_production.yaml
if: ${{ needs.trigger-production-tag-release.outputs.tag_exists == 'false' }}
secrets: inherit
If you are adding new workflows or updating existing ones, please ensure to update this README
with descriptions and usage examples for easy integration by other teams. Make sure your workflows follow best practices for GitHub Actions to ensure reliability and maintainability.