From 2d888c080375c0a4fc087384d4e2d350814a5713 Mon Sep 17 00:00:00 2001 From: otaviomacedo <288203+otaviomacedo@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:23:54 +0000 Subject: [PATCH] chore: workflow to protect the metadata.ts file against manual changes --- .github/workflows/check-region-changes.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/check-region-changes.yml diff --git a/.github/workflows/check-region-changes.yml b/.github/workflows/check-region-changes.yml new file mode 100644 index 0000000000000..7d8fdfc972a0f --- /dev/null +++ b/.github/workflows/check-region-changes.yml @@ -0,0 +1,19 @@ +name: Check Metadata region changes + +on: + pull_request: + branches: + - main + paths: + - packages/aws-cdk-lib/region-info/build-tools/metadata.ts + +jobs: + changed_files: + runs-on: ubuntu-latest + name: Inspect changed files + steps: + - name: Check for unauthorized requesters + if: ${{ github.event.pull_request.user.login != 'github-actions[bot]' }} + run: | + echo "Only github-actions[bot] is authorized to change the metadata.ts file." + exit 1 \ No newline at end of file