Skip to content

Cloud expo demo

Cloud expo demo #11

Workflow file for this run

name: 'Infra'
on:
pull_request:
push:
branches:
- main
env:
PLATFORM_REPO: "cldcvr/terrarium"
PLATFORM_BRANCH: "main"
PLATFORM_DIR: "examples/platform-demo/platform"
TERRARIUM_VERSION: "v0.6"
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
TF_CLOUD_ORGANIZATION: "kanak"
TF_WORKSPACE: "demo-go-pgsql-workflow"
TF_CONFIG_DIRECTORY: "./.terrarium-output"
jobs:
t8-generate:
name: "Terrarium generate"
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout Platform Repo
uses: actions/checkout@v3
with:
repository: ${{ env.PLATFORM_REPO }}
ref: ${{ env.PLATFORM_BRANCH }}
token: ${{ secrets.GH_TOKEN }}
path: "./.platform-repo"
- name: Terrarium Install
uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/cldcvr/terrarium/releases/download/${{ env.TERRARIUM_VERSION }}/terrarium-${{ env.TERRARIUM_VERSION }}-linux-amd64.tar.gz'
name: 'terrarium'
version: ${{ env.TERRARIUM_VERSION }}
- name: Terrarium Generate
run: |
terrarium generate -p .platform-repo/$PLATFORM_DIR -a . -o $TF_CONFIG_DIRECTORY/src
cp -r .platform-repo/examples/platform-demo/modules ./$TF_CONFIG_DIRECTORY/modules
- name: "Push Terrarium generated code at path : ${{ env.TF_CONFIG_DIRECTORY }}"
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: terrarium-generate-code
path: ${{ env.TF_CONFIG_DIRECTORY }}
branch: "akashj/demo"
commit_user_name: Akash Jaiswal # defaults to "github-actions[bot]"
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"