I am using the code below in YML file to commit and push "data.xlsx" file within scheduled github actions. There are sometimes this file ("data.xlsx") doesn't get created so commit returns errors - "Your branch is up to date with 'origin/main'. nothing to commit, working tree clean. Error: Process completed with exit code 1" Is there any way to not to run this section when file does not exist
- name: Commit files
run: |
git config --local user.name actions-user
git config --local user.email "[email protected]"
git add *
git commit -am "GH ACTION Headlines $(date)"
git push origin main -f
env:
REPO_KEY: ${{secrets.GITHUB_TOKEN}}
username: github-actions