Skip to content

small tweaks to logging UX #8

small tweaks to logging UX

small tweaks to logging UX #8

name: Prevent New Terraform SDK additions
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
detect-new-sdk-files:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check for new SDK resources or datasources
run: |
git diff --name-status origin/main..${{ vars.GITHUB_REF }} | grep '^A' | grep '^A\s\+octopusdeploy/' > new_files.txt || true
if [ -s new_files.txt ]; then
echo "::error::New files were found in the 'octopusdeploy/' directory:"
cat new_files.txt
echo "We are no longer creating new Terraform SDK resources or datasources. Anything new should be added using Terraform Framework in the 'octopusdeploy_framework' folder instead."
exit 1
else
echo ":white_check_mark: No new files detected in the 'octopusdeploy/' directory."
fi