name: Use a different repository directory on: push: branches: [_action_test] jobs: run: name: Add a text file runs-on: ubuntu-latest steps: # If you need to, you can check out your repo to a different location - uses: actions/checkout@v3 with: path: './pathToRepo/' # You can make whatever type of change to the repo... - run: echo "123" > ./pathToRepo/file.txt # ...and then use the action as you would normally do, but providing the path to the repo - uses: EndBug/add-and-commit@v9 with: message: 'Add the very useful text file' add: '*.txt --force' cwd: './pathToRepo/' new_branch: custom-new-branch