Skip to content

Can this be used to sync JSON files by creating commits? #162

Answered by stefanzweifel
zefir-git asked this question in Help
Discussion options

You must be logged in to vote

This should be possible. But git-auto-commit will only play a small role in that workflow.
git-auto-commit will only detect changes in files, commit them and push them pack to GitHub.

The logic that detects if a line has been added or removed and then updates a JSON file is up to you.

Here is a very basic example of how such a workflow could look like:

name: Demo

on:
  push:
    paths:
      - 'folder/**.json'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v2

      - name: Update JSON Files
        run: ./path/to/binary/to/run/your/logic

      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zefir-git
Comment options

@stefanzweifel
Comment options

@zefir-git
Comment options

@zefir-git
Comment options

Answer selected by zefir-git
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