Skip to content

Fix project persistence settings #30

Fix project persistence settings

Fix project persistence settings #30

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 "New files were found in the 'octopusdeploy/' directory."
cat new_files.txt
echo "::error::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 "::notice::No new files detected in the 'octopusdeploy/' directory."
fi