From b2fd266e89d84beda57ad967a343d1e5df42ae60 Mon Sep 17 00:00:00 2001 From: daz Date: Wed, 10 Apr 2024 11:10:32 -0600 Subject: [PATCH] List changed files when failing due to dist directory change Hopefully this will help track down spurious failures. --- .github/workflows/ci-check-no-dist-update.yml | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-check-no-dist-update.yml b/.github/workflows/ci-check-no-dist-update.yml index 6582dd7..515cb17 100644 --- a/.github/workflows/ci-check-no-dist-update.yml +++ b/.github/workflows/ci-check-no-dist-update.yml @@ -2,6 +2,7 @@ name: CI-check-no-dist-update # Prohibit any change to 'dist/**' on a non-release branch on: + workflow_dispatch: push: branches-ignore: - 'main' @@ -15,8 +16,27 @@ permissions: jobs: fail-on-dist-update: runs-on: ubuntu-latest - steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: | + dist/** + + - name: Print changes to dist directory + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + done + - run: | echo "The 'dist' directory is auotmatically updated by the release process." echo "It should not be updated manually in a non-release branch or a pull request."