Skip to content

Commit a859c06

Browse files
ci: custom commit flow
1 parent 191d95a commit a859c06

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

.github/workflows/release-please.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,17 @@ jobs:
5151
dart run build_runner build --delete-conflicting-outputs
5252
5353
- name: Commit and push changes (build runner)
54-
uses: devops-infra/action-commit-push@master
5554
if: ${{ steps.release.outputs.prs_created == 'true' }}
56-
with:
57-
github_token: "${{ steps.generate-token.outputs.token }}"
58-
add_timestamp: false
59-
commit_prefix: "chore: "
60-
commit_message: "run build_runner build"
61-
force: false
62-
target_branch: ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
55+
env:
56+
TARGET_BRANCH: ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
57+
run: |
58+
if [ -z "$(git status --porcelain)" ]; then
59+
echo "No build_runner changes to commit."
60+
exit 0
61+
fi
62+
63+
git config user.name "github-actions[bot]"
64+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
65+
git add .
66+
git commit -m "chore: run build_runner build"
67+
git push origin "HEAD:${TARGET_BRANCH}"

0 commit comments

Comments
 (0)