-
-
Notifications
You must be signed in to change notification settings - Fork 2
29 lines (23 loc) · 812 Bytes
/
auto-commit.yml
File metadata and controls
29 lines (23 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Auto Commit and Push
on:
push:
branches:
- main # Ganti dengan branch yang Anda gunakan
jobs:
commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Git
run: |
git config --local user.name "Your Bot Name" # Ganti dengan nama bot Anda
git config --local user.email "your-email@example.com" # Ganti dengan email bot Anda
- name: Add changes
run: |
git add .
git commit -m "Automated commit" || echo "No changes to commit"
- name: Push changes
run: git push origin main # Ganti dengan branch yang Anda gunakan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Token yang disediakan oleh GitHub untuk autentikasi