This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Domain Değişiklik Kontrolü #292
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. | |
name: Domain Değişiklik Kontrolü | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 11 */9 * * * | |
jobs: | |
DomainKontrol: | |
#runs-on: ubuntu-latest | |
runs-on: self-hosted | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO_OWNER: ${{ github.repository_owner }} | |
REPO_NAME: ${{ github.event.repository.name }} | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name : Depo Kontrolü | |
uses : actions/[email protected] | |
- name : Python 3.11.8 Yükle | |
uses : actions/[email protected] | |
with : | |
python-version: 3.11.8 | |
- name : Python Sürümünü Göster | |
run : python -c "import sys; print(sys.version)" | |
- name : Gereksinimleri Yükle | |
run : | | |
python -m pip install --upgrade pip | |
pip install -U setuptools wheel Kekik cloudscraper | |
- name : Betiği Çalıştır | |
run : | | |
python KONTROL.py | |
- name : Değişiklik Kontrolü | |
id : degisiklik_kontrol | |
run : | | |
git diff --quiet . || echo "degisiklik=true" >> $GITHUB_OUTPUT || true | |
- name : Pull Request Oluştur | |
if : steps.degisiklik_kontrol.outputs.degisiklik == 'true' | |
run : | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit --author="keyiflerolsun <[email protected]>" \ | |
-m "♻️ Domain Değişikliği" \ | |
-m "🔄 Otomatik domain güncellemeleri yapıldı." | |
BRANCH="domain-degisikligi" | |
git checkout -B $BRANCH | |
git push origin $BRANCH --force | |
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/pulls \ | |
-d @- <<EOF | |
{ | |
"title": "♻️ Domain Değişikliği", | |
"head": "$BRANCH", | |
"base": "master", | |
"body": "🔄 Otomatik tespit edilen domain değişiklikleri uygulandı.\n\n📂 İlgili dosyalar güncellendi. Lütfen değişiklikleri gözden geçirin ve onaylayın." | |
} | |
EOF |