From acc259a9cfad421f52cb86f0dd3f8564a02db3e9 Mon Sep 17 00:00:00 2001 From: Rehan Butt Date: Mon, 12 Feb 2024 22:56:38 -0800 Subject: [PATCH] Update version-check.yml --- .github/workflows/version-check.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index c92216b1..dd2e1001 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -6,14 +6,20 @@ on: - '**/*' # This triggers the workflow for any file changes jobs: - print-changes: - runs-on: ubuntu-latest - + build: + runs-on: ubuntu-latest # windows-latest | macos-latest + name: Test changed-files steps: - - name: Checkout code - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v14.6 - - name: Print Changed Files + - name: List all changed files run: | - echo "Changed Files 122:" - git diff --name-only ${{ github.base_ref }}..${{ github.head_ref }} + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + echo "$file was changed" + done