This repository contains reusable GitHub Actions workflows for dataliquid projects.
To quickly install the Gitflow workflows in your project, run:
curl -s https://raw.githubusercontent.com/dataliquid/github-actions/main/install-gitflow-workflows.sh | bash
This will download and install both gitflow-release and gitflow-hotfix workflows in your project.
Manages the gitflow release process with automatic branch detection.
File: .github/workflows/gitflow-release.yml
Features:
- Start a new release branch
- Finish a release with automatic merge to master and develop
- Auto-detection of single release branch for finish action
- Configurable Java version and distribution
Manages the gitflow hotfix process for emergency fixes.
File: .github/workflows/gitflow-hotfix.yml
Features:
- Start a new hotfix branch from master
- Finish a hotfix with automatic merge to master and develop
- Configurable Java version and distribution
To use these workflows in your project, create a workflow file in your repository that calls the reusable workflow:
Create .github/workflows/gitflow-release.yml
in your repository:
name: Gitflow Release
on:
workflow_dispatch:
inputs:
action:
description: 'Gitflow action to perform'
required: true
type: choice
options:
- release-start
- release-finish
version:
description: 'Release version (optional for auto-detection)'
required: false
type: string
jobs:
release:
uses: dataliquid/github-actions/.github/workflows/gitflow-release.yml@main
with:
action: ${{ inputs.action }}
version: ${{ inputs.version }}
Create .github/workflows/gitflow-hotfix.yml
in your repository:
name: Gitflow Hotfix
on:
workflow_dispatch:
inputs:
action:
description: 'Gitflow action to perform'
required: true
type: choice
options:
- hotfix-start
- hotfix-finish
version:
description: 'Hotfix version (e.g., 1.17.1)'
required: true
type: string
jobs:
hotfix:
uses: dataliquid/github-actions/.github/workflows/gitflow-hotfix.yml@main
with:
action: ${{ inputs.action }}
version: ${{ inputs.version }}
All workflows support the following optional parameters:
java-version
: Java version to use (default: '8')java-distribution
: Java distribution to use (default: 'temurin')runs-on
: Runner OS (default: 'ubuntu-latest')
action
: Required. Either 'release-start' or 'release-finish'version
: Optional. Release version (e.g., '1.18.0'). If not provided for release-finish, will auto-detect if only one release branch exists
action
: Required. Either 'hotfix-start' or 'hotfix-finish'version
: Required. Hotfix version (e.g., '1.17.1')
Your project must:
- Use Maven with the gitflow plugin configured
- Have proper Git configuration
- Have appropriate permissions for the workflow to push to protected branches
See the examples/
directory for complete workflow examples that you can copy to your project.
To add new reusable workflows:
- Create the workflow file in
.github/workflows/
- Use
workflow_call
as the trigger - Document the workflow in this README
- Add an example in the
examples/
directory