This repo contains shared GitHub Actions workflows that are used by multiple repos under the Keptn GitHub organization.
The following re-usable workflows are available:
Name | Filename | Description | Inputs | Outputs |
---|---|---|---|---|
DCO | dco.yml |
Checks the Developer Certificate of Origin on a PR or on a default branch. | exclude-emails : Comma-separated list of emails that should be ignored during DCO checks |
None |
Validate Semantic PR | validate-semantic-pr.yml |
Checks for Semantic PR messages in order to enhance release note generation | types : List of types scopes : List of scopes |
None |
Pre-Release Integration | pre-release-integration.yml |
Creates a pre-release of a Keptn integration | PRERELEASE_KEYWORD : Keyword for pre-releases, e.g., alpha , next |
RELEASE_TAG |
Release Integration | release-integration.yml |
Creates a (draft) release of a Keptn integration | draft (default: true) |
RELEASE_TAG |
Prepare CI Run | prepare-ci.yml |
Determines Git Commit Hash, next version, Datetime | None | BRANCH BRANCH_SLUG VERSION DATETIME GIT_SHA |
The following re-usable actions are available:
Name | Filename | Description | Inputs | Outputs |
---|---|---|---|---|
Docker Build | actions/docker-build/action.yaml |
Docker Login, Build and Push | See Docker Build Action | - |
Build Helm Charts | actions/build-helm-charts/action.yaml |
Lints and builds Helm chart | See Build Helm Charts | - |
Inputs:
TAGS
: List of images/tags to be pushed, e.g., keptncontrib/my-service:1.2.3BUILD_ARGS
: List of build argumentsREGISTRY_USER
: DockerHub User used for pushing to docker.io - leave empty if you don't want to push to docker.ioREGISTRY_PASSWORD
: DockerHub token or password used for pushing to docker.io - leave empty if you don't want to push to docker.ioGITHUB_TOKEN
: Github Access token used for pushing to ghcr.io - leave empty if you don't want to push to ghcr.ioDOCKERFILE
: Dockerfile to be used in docker buildTARGET
: Target to be built using docker buildPULL
: Whether or not to pull the image before building (i.e., to make use of cached layers)PUSH
: Whether or not to push the image to the desired registries
Outputs:
BUILD_METADATA
: Docker build Metadata, see Docker Build Push Action Docs
Example Usage:
- name: Docker Build
id: docker_build
uses: keptn/gh-automation/.github/actions/docker-build@v1
with:
TAGS: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.VERSION }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.VERSION }}.${{ env.DATETIME }}
${{ env.DOCKER_ORGANIZATION }}/${{ env.IMAGE_INITCONTAINER }}:${{ env.VERSION }}
${{ env.DOCKER_ORGANIZATION }}/${{ env.IMAGE_INITCONTAINER }}:${{ env.VERSION }}.${{ env.DATETIME }}
BUILD_ARGS: |
version=${{ env.VERSION }}
datetime=${{ env.DATETIME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
DOCKERFILE: Dockerfile
Inputs:
VERSION
: Version of your Helm chart e.g., 0.7.2-next.0APP_VERSION
: Helm Chart app versionCHART_NAME
: Name used in the Helm chart e.g., job-executor-serviceBASE_PATH
: Base path the action should execute Helm commands fromCHARTS_PATHS
: Path of your Helm chart directory relative to the BASE_PATHOUTPUT_DIRECTORY
: Directory the chart will be output into
Example Usage:
- name: Build Helm Charts
id: build_helm_charts
uses: keptn/gh-automation/.github/actions/[email protected]
with:
VERSION: ${{ env.VERSION }}
APP_VERSION: ${{ env.VERSION }}.${{ env.DATETIME }}
CHART_NAME: ${{ env.IMAGE }}