Skip to content

Commit ff609eb

Browse files
Update commit.md
1 parent 3ee7adb commit ff609eb

File tree

1 file changed

+6
-4
lines changed
  • recipes/ci-cd/github-actions/workflows

1 file changed

+6
-4
lines changed

recipes/ci-cd/github-actions/workflows/commit.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Commit
3-
description: How to commit files during the CI flow - using a generic Action
3+
description: How to commit and push files during the CI flow
44
---
55

66

@@ -39,7 +39,9 @@ A placeholder step is used to modify files in the workspace. Replace it with som
3939

4040
### No action
4141

42-
A simple way to commit any changes on the current branch. This is slightly verbose but not too long. You know exactly what it is doing and it is easy to customize.
42+
A simple way to commit any changes on the current branch and push changes.
43+
44+
This is slightly verbose but not too long. You know exactly what it is doing and it is easy to customize.
4345

4446
- `main.yml`
4547
```yaml
@@ -54,13 +56,13 @@ A simple way to commit any changes on the current branch. This is slightly verbo
5456
id: git-check
5557
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
5658

57-
- name: Commit changes
59+
- name: Commit and push changes
5860
if: steps.git-check.outputs.modified == 'true'
5961
run: |
6062
git config --global user.name 'Automated Publisher'
6163
git config --global user.email 'actions@users.noreply.github.com'
6264
git commit -am "Commit message..."
63-
65+
6466
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
6567
git push
6668
```

0 commit comments

Comments
 (0)