Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work for a push of many commits #24

Open
chermed opened this issue Mar 6, 2021 · 1 comment
Open

Doesn't work for a push of many commits #24

chermed opened this issue Mar 6, 2021 · 1 comment

Comments

@chermed
Copy link

chermed commented Mar 6, 2021

When I push many commits, it just detect the changes from the last commit:

name: Test

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.1.0
      - uses: jitterbit/get-changed-files@v1
        id: abc
        with:
          format: space-delimited
          token: ${{ secrets.GITHUB_TOKEN }}
      - name: Printing
        run: |
          echo "All:"
          echo "${{ steps.abc.outputs.all }}"
          echo "Added:"
          echo "${{ steps.abc.outputs.added }}"
          echo "Removed:"
          echo "${{ steps.abc.outputs.removed }}"
          echo "Renamed:"
          echo "${{ steps.abc.outputs.renamed }}"
          echo "Modified:"
          echo "${{ steps.abc.outputs.modified }}"
          echo "Added+Modified:"
          echo "${{ steps.abc.outputs.added_modified }}"

Example from stackoverflow (not mine)

@TannerGilbert
Copy link

This reply is kind of late, but maybe it will help someone out. You need to set the fetch-depth for actions/checkout to get the complete history.

# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: ''

Example code:

- uses: actions/checkout@v2
  with:
    fetch-depth: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants