You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
TerrakubeAction
0.3.8
Pre-release
This is an example to show how easy is to integrate Terrakube with GitHub Actions.
Add the following snippet to the script section of your github actions file:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: AzBuilder/[email protected]
with:
TERRAKUBE_TOKEN: "xxxxxx" # Terrakube Personal Access Token
TERRAKUBE_TEMPLATE: "Terraform-Plan"
TERRAKUBE_REPOSITORY: "https://github.com/AzBuilder/terraform-sample-repository.git"
TERRAKUBE_ENDPOINT: "https://terrakube.interal/service"
TERRAKUBE_BRANCH: ${{ github.head_ref }}
GITHUB_TOKEN: "xxxx"
Variable | Usage |
---|---|
TERRAKUBE_TOKEN (*) | Terrakube Personal Access Token |
TERRAKUBE_REPOSITORY (*) | Terrakube git repository |
TERRAKUBE_TEMPLATE (*) | Terrakube template name |
TERRAKUBE_ENDPOINT (*) | Terrakbue api endpoint |
TERRAKUBE_BRANCH (*) | Github Branch when running a job |
GITHUB_TOKEN (*) | Github Token |
(*) = required variable.
Create a file called "terrakube.json" and include the terraform.tfvars
{
"organization": "simple",
"workspace": "workspace_demo",
"workspaceSrc": "https://github.com/AzBuilder/terraform-sample-repository.git",
"terraform": "1.2.9",
"folder": "/workspace2"
}
This can be used to test the github action in your local machine.
git clone https://github.com/AzBuilder/terrakube-action-github.git
yarn install
After cloning the project update the file tests with the environment variales
yarn test
If you’d like help with this github action, or you have an issue or feature request, let us know.
If you’re reporting an issue, please include:
- the version of the github action
- relevant logs and error messages
- steps to reproduce