This repository mainly contains various scripts for automations, pipelines and workflows used in combination with self hosted github runners
The following is required to start using this repository:
- Docker - We provision self hosted github runners using docker compose
- Self Hosted GitHub Runners - Contains all scripts and configuration files to bring up self hosted github runners
Workflow Usage:
build_push_image:
name: Building and storing PhotoAtom Runner Docker Image
uses: necro-cloud/automations/.github/workflows/build-docker-image.yml@main
with:
dev_version_name: <DEVELOPMENT VERSION NAME HERE>
image_name: <IMAGE NAME HERE>
image_proper_name: <PROPER IMAGE NAME HERE>
build_path: <BUILD PATH HERE>
repository: <QUAY.IO REPOSITORY NAME HERE>
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}Inputs:
image_proper_name: Proper name for the imageimage_name: Name of the image to be builtdev_version_name: Name to attached to the development build version, defaults todevpre_build_script: Script to run before image build processbuild_path: Directory to build docker image fromrepository: Repository to push the image in
Secrets:
DOCKER_USERNAME: Docker username for AuthenticationDOCKER_PASSWORD: Docker password for Authentication
execute_scripts:
name: Scripts Deployment onto Self Hosted K3d Cluster
uses: necro-cloud/automations/.github/workflows/execute-script.yml@main
with:
deployment_name: Scripts Deployment
runners: self-hosted-runner
shell_script: |
whoami
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}Inputs:
deployment_name: Name of the deployment to be performedrunners: Self Hosted Runners to be used for deploymentshell_script: Script for executing within runner and K3D context
Secrets:
KUBECONFIG: KubeConfig to be used for deployment for K8s resources
namespace_deploy:
name: Namespace Deployment onto Self Hosted K3d Cluster
uses: necro-cloud/automations/.github/workflows/tofu-deploy.yml@main
with:
deployment_name: Namespace
folder_path: namespace
runners: self-hosted-runner
secrets:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
TFVARS: ${{ secrets.TFVARS }}Inputs:
deployment_name: Name of the deployment to be performedfolder_path: Path for the deployment to be performedrunners: Self Hosted Runners to be used for deploymentpre_init_script: Script to run before running Tofu Initpre_plan_script: Script to run before running Tofu Planpre_apply_script: Script to run before running Tofu Applypost_apply_script: Script to run after running Tofu Applyartifact_version: Artifact Version for deploying using OpenTofu
Secrets:
KUBECONFIG: KubeConfig to be used for deployment for Kubernetes resourcesTFVARS: TFVARS File to be used for deployment for Kubernetes resources