Skip to content

This repo is the single source of truth for pipelines that are shared across Keptn repos

License

Notifications You must be signed in to change notification settings

keptn/gh-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Keptn GH Actions DevOps Collection

This repo contains shared GitHub Actions workflows that are used by multiple repos under the Keptn GitHub organization.

Workflows

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

Actions

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 -

Docker Build Action

Inputs:

  • TAGS: List of images/tags to be pushed, e.g., keptncontrib/my-service:1.2.3
  • BUILD_ARGS: List of build arguments
  • REGISTRY_USER: DockerHub User used for pushing to docker.io - leave empty if you don't want to push to docker.io
  • REGISTRY_PASSWORD: DockerHub token or password used for pushing to docker.io - leave empty if you don't want to push to docker.io
  • GITHUB_TOKEN: Github Access token used for pushing to ghcr.io - leave empty if you don't want to push to ghcr.io
  • DOCKERFILE: Dockerfile to be used in docker build
  • TARGET: Target to be built using docker build
  • PULL: 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:

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

Build Helm Charts

Inputs:

  • VERSION: Version of your Helm chart e.g., 0.7.2-next.0
  • APP_VERSION: Helm Chart app version
  • CHART_NAME: Name used in the Helm chart e.g., job-executor-service
  • BASE_PATH: Base path the action should execute Helm commands from
  • CHARTS_PATHS: Path of your Helm chart directory relative to the BASE_PATH
  • OUTPUT_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 }}

About

This repo is the single source of truth for pipelines that are shared across Keptn repos

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages