diff --git a/.github/actions/has-change-file/action.yaml b/.github/actions/has-change-file/action.yaml new file mode 100644 index 00000000..9f8e574d --- /dev/null +++ b/.github/actions/has-change-file/action.yaml @@ -0,0 +1,25 @@ +name: Has Change File +description: Check if a new change file is set + +inputs: + registry: + required: false + default: "" + description: "Regional or multi-regional location of the repository where the image is stored" + +runs: + using: "composite" + steps: + - uses: dorny/paths-filter@v3 + id: changes + with: + filters: | + changes: + - '.changes/unreleased/**' + + - name: Check changes + if: steps.changes.outputs.src == 'true' + shell: bash + run: | + echo "No new change file set in .changes/unreleased" + exit 1 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e5e9d12b..cdc007f2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,6 +16,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Has changes file + uses: ./.github/actions/has-change-file + - uses: hashicorp/setup-terraform@v2 with: terraform_version: 1.3.7