Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rezapace/ijoin
🌿 Bot Penghijauan Repository
https://github.com/rezapace/ijoin
bot git-reza
Last synced: 3 days ago
JSON representation
🌿 Bot Penghijauan Repository
- Host: GitHub
- URL: https://github.com/rezapace/ijoin
- Owner: rezapace
- Created: 2023-10-17T01:36:34.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-29T09:16:25.000Z (22 days ago)
- Last Synced: 2024-10-29T09:39:35.979Z (22 days ago)
- Topics: bot, git-reza
- Language: Go
- Homepage: https://www.webkumal.link/
- Size: 1.41 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🌿 Bot Penghijauan Repository
berisikan Bot untuk melakukan Penghijauan Repository
```powershell
name: CIon:
push:
branches:
- master
workflow_dispatch:
schedule:
- cron: "0 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 * * *"
pull_request:
branches:
- masterjobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkout repository
uses: actions/checkout@v2- name: Pull latest changes
run: git pull- name: Create and populate random file
run: |
# Generate a random 9-digit number
random_number=$((100000000 + RANDOM % 900000000))# Create a Go file with the random number as the name
filename="${random_number}.go"# Write the Go code to the file
echo 'package mainimport (
"fmt"
"os"
)func calculateTip(tagihan float64) (float64, float64) {
var tipRate float64if tagihan >= 50 && tagihan <= 300 {
tipRate = 0.15
} else {
tipRate = 0.20
}tip := tagihan * tipRate
total := tagihan + tipreturn tip, total
}func main() {
var tagihan float64
fmt.Print("Masukkan nilai tagihan: ")
fmt.Scan(&tagihan)tip, total := calculateTip(tagihan)
outputText := fmt.Sprintf("Tagihannya: Rp. %.2f\nTipnya: Rp. %.2f\nTotal nilainya: Rp. %.2f\n", tagihan, tip, total)
// Membuka file output.txt untuk penulisan
file, err := os.Create("output.txt")
if err != nil {
fmt.Println("Error:", err)
return
}
defer file.Close()// Menulis output ke file
_, err = file.WriteString(outputText)
if err != nil {
fmt.Println("Error:", err)
return
}fmt.Println("Output telah ditulis ke output.txt")' > "$filename"
echo "Created and populated file: $filename"
working-directory: ${{ github.workspace }}- name: Commit and push random file
run: |
git add .
git config user.name 'rezapace'
git config user.email '[email protected]'
git commit -m "Add random Go file"
git push
```