diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 41143d8..399cff6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,14 +31,14 @@ jobs: - name: Create list of changed files run: | - # See https://github.community/t/check-pushed-file-changes-with-git-diff-tree-in-github-actions/17220/10 + echo "github.event_name is ${{ github.event_name }}" if [ "${{ github.event_name }}" = "pull_request" ]; then - # Pull Request + echo "Pull Request" git fetch origin ${{ github.event.pull_request.base.ref }} --depth=1 export DIFF=$( git diff --name-only ${{ github.event.pull_request.base.ref }} $GITHUB_SHA ) echo "Diff between origin/${{ github.event.pull_request.base.ref }} and $GITHUB_SHA" else - # Push + echo "Push" git fetch origin ${{ github.event.before }} --depth=1 export DIFF=$( git diff --name-only ${{ github.event.before }} $GITHUB_SHA ) echo "Diff between ${{ github.event.before }} and $GITHUB_SHA"