Skip to content

Commit

Permalink
Add git add and commit
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfiea committed Apr 24, 2024
1 parent 4fa3ff0 commit 09c252f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/update-internal-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,14 @@ jobs:
cd $GITHUB_WORKSPACE/target
git config user.name "GitHub Actions Bot"
git config user.email "<>"
echo "git: Adding all files in $$GITHUB_WORKSPACE/target directory"
export FILES_ADDED=$(git add -v . | wc -l | xargs)
echo "git: Added ${FILES_ADDED} files"
if [ "$FILES_ADDED" != "0" ]; then
echo "git: Committing files"
git commit -m "Synch commit between ibm-mas/gitops and $REMOTE_REPO"
fi
echo "Push changes to ${{ env.GITHUB_BRANCH }} branch of https://github.ibm.com/${{ env.REMOTE_REPO }}"
git push origin ${{ env.GITHUB_BRANCH }}

0 comments on commit 09c252f

Please sign in to comment.