Skip to content

Commit c863aac

Browse files
committed
Change commit and push logic
1 parent 18e47a8 commit c863aac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/update-jmxfetch-submodule.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@ jobs:
3232
env:
3333
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3434
run: |
35-
ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add dd-java-agent/agent-jmxfetch/integrations-core --message "Update agent-jmxfetch submodule"
35+
git config user.name "github-actions[bot]"
36+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
37+
if [[ -z "$(git status -s)" ]]; then
38+
echo "No changes to commit, exiting."
39+
exit 0;
40+
fi
41+
git checkout -b ${{ steps.define-branch.outputs.branch }}
42+
git add dd-java-agent/agent-jmxfetch/integrations-core
43+
git commit -m "Update agent-jmxfetch submodule"
44+
git push origin ${{ steps.define-branch.outputs.branch }}
3645
- name: Create pull request
3746
env:
3847
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)