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

[Output variable] List of specific file changes #68

Open
LangLangBart opened this issue Jun 20, 2023 · 1 comment
Open

[Output variable] List of specific file changes #68

LangLangBart opened this issue Jun 20, 2023 · 1 comment

Comments

@LangLangBart
Copy link

LangLangBart commented Jun 20, 2023

description

  • the README states to open a new issue for more Output Variables
  • could you provide a variable to see what kind of files have been changed

use case

  • I would like to check if the list of new commits includes '.cpp' files
# example with a made up variable called 'file_changes_include'
    - name: New commits found and it includes '.cpp' changes
      if: |
        (steps.sync.outputs.has_new_commits == 'true' &&
        steps.sync.outputs.file_changes_include == '*cpp*')
      run: |
        echo "New commits were found to sync."
        make

PS: The action works very well, a good job of you to make it available to the public.

@LangLangBart
Copy link
Author

  • the git_log_format_args with --pretty=format:"" --patch --name-only shows me the files of interest in the logs, is there any way to access them in later steps so I can read out the information I want?
    steps:
      - uses: actions/checkout@v3
      - uses: aormsby/Fork-Sync-With-Upstream-action@main
        id: sync
        with:
          # rebase the local branch on top of the remote changes
          git_config_pull_rebase: true
          target_sync_branch: testing
          target_repo_token: ${{ secrets.GITHUB_TOKEN }}
          # list
          git_log_format_args: --pretty=format:"" --patch --name-only
          # force push, because of the rebase
          target_branch_push_args: --force
          upstream_sync_branch: master
          upstream_sync_repo: 0ad/0ad
          upstream_pull_args: --ff --no-edit
          test_mode: false

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