Skip to content

added building

added building #12

name: Demo | Workflow 1 - Plan Targetted at Staging
on:
workflow_dispatch:
inputs:
environment:
description: "Target RTL Environment"
required: true
type: choice
options:
- sandbox
- staging
- production
pull_request:
types: [opened, reopened]
# Target
branches:
- main
# Only if .tf files in this directory are part of the diff.
paths:
- 'workload/terraform/jamfpro/*.tf'
jobs:
# Check changes are coming from a feat-* or bugfix-* named branch
check-branch-name:
uses: ./.github/workflows/utility/branch_name_check.yml

Check failure on line 30 in .github/workflows/demo_1_plan_staging.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/demo_1_plan_staging.yml

Invalid workflow file

invalid value workflow reference: workflows must be defined at the top level of the .github/workflows/ directory
with:
branch-name: ${{ github.event.pull_request.head.ref }}
# Terraform Plan
terraform:
environment: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.environment || 'staging' }}
runs-on: ubuntu-latest
# Bring repo to runner
steps:
- name: checkout
uses: actions/checkout@v4
# Run plan using hashi create-run
- name: "plan"
uses: hashicorp/tfc-workflows-github/actions/[email protected]
with:
token: ${{ secrets.TF_USER_API_TOKEN }}
workspace: ${{ vars.TF_WORKSPACE }}
organization: ${{ vars.TF_CLOUD_ORG }}