Skip to main content

GitHub Actions Workflow

The GitHub workflow file is required to execute the Terrateam GitHub Action.

info

This file must exist in your Terraform repository default branch in .github/workflows/terrateam.yml

warning

Please do not modify the Terrateam GitHub Actions Workflow unless our documentation instructs you to do so.

If the workflow file is modified, Terrateam may not operate as intended.

##########################################################################
# DO NOT MODIFY
#
# THIS FILE SHOULD LIVE IN .github/workflows/terrateam.yml
#
# Looking for the Terrateam configuration file? .terrateam/config.yml.
#
# See https://docs.terrateam.io/configuration/overview for details
##########################################################################
name: 'Terrateam Workflow'
on:
workflow_dispatch:
inputs:
# The work-token is automatically passed in by the Terrateam backend
work-token:
description: 'Work Token'
required: true
api-base-url:
description: 'API Base URL'
jobs:
terrateam:
runs-on: ubuntu-latest
name: Terrateam Action
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run Terrateam Action
id: terrateam
uses: terrateamio/action@v1 # Do not replace with a custom image. Doing so may cause Terrateam to not operate as intended.
with:
work-token: '${{ github.event.inputs.work-token }}'
api-base-url: '${{ github.event.inputs.api-base-url }}'
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}