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

How can I set the action to review all commits since the last workflow run? #400

Closed
caffeinatedMike opened this issue Feb 24, 2022 · 2 comments

Comments

@caffeinatedMike
Copy link

I have the following workflow

jobs:
  api_metadata_refresh:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - id: file-changes
        name: Get changed-files in step_two directory
        uses: tj-actions/changed-files@v14.3
        with:
          files: |
            **/step_two/*
      - id: auth
        if: ${{ steps.file-changes.outputs.any_changed == 'true' || steps.file-changes.outputs.any_modified == 'true' }}
        name: Authenticate
        uses: google-github-actions/auth@v0
        with:
          credentials_json: ${{ secrets.GCP_CREDENTIALS }}
      - id: deploy
        if: ${{ steps.file-changes.outputs.any_changed == 'true' || steps.file-changes.outputs.any_modified == 'true' }}
        name: Deploy
        uses: google-github-actions/deploy-cloud-functions@v0
        with:
          ...

Which works great for the previous commit, but when I make multiple commits locally and push them at the end of the day the above workflow does not catch changes from the commits that aren't the last commit in the bunch.

How can I determine the last commit in which the workflow ran on and set that point as the starting point for the latest push's workflow job?

@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience.

@caffeinatedMike
Copy link
Author

I'm silly, just found the since_last_remote_commit option. Sorry about that!

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

1 participant