Skip to content

Commit if there are file by pattern in the commit itself #176

Answered by stefanzweifel
Mte90 asked this question in Help
Discussion options

You must be logged in to vote

The file_pattern is used in the "is dirty"-check and determines if files should be added and committed (see code); so I think what you want to do should work.

I think examples make everything easier.
If I understood you correctly, your workflow looks something like this:

# other code related to when workflow is triggered

-   run: /execute/some/code

-   uses: stefanzweifel/git-auto-commit-action@v4
    id: auto-commit-action
    with:
        file_pattern: src/*.js

-   name: "Generate PDFs if previously a commit has been created"
    if: steps.auto-commit-action.outputs.changes_detected == 'true'
    run: /generate/pdfs

-   name: "Commit generated PDFs"
    if: steps.auto-commit-action…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by stefanzweifel
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #175 on September 17, 2021 11:08.