Update update-hostbill-dna.yml #7
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
name: Update hostbill-dna repo | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-hostbill-dna: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. php-dna Repoyu Checkout Et | |
- name: Checkout php-dna repo | |
uses: actions/checkout@v3 | |
# 2. hostbill-dna Repoyu Clone Et | |
- name: Clone hostbill-dna repo | |
run: | | |
git clone https://github.com/domainreseller/hostbill-dna.git hostbill-dna | |
- name: Debug php-dna repo structure | |
run: | | |
ls -R | |
# 3. php-dna içindeki dosyayı hostbill-dna içindeki hedef dizine taşı | |
- name: Copy updated library file | |
run: | | |
cp DomainNameApi/DomainNameAPI_PHPLibrary.php hostbill-dna/includes/modules/Domain/domainnameapi/lib/dna1.php | |
# 4. hostbill-dna Repoda Değişiklikleri Commit Et ve Push Et | |
- name: Commit and push changes | |
env: | |
PAT: ${{ secrets.HOSTBILL_DNA_PAT }} | |
run: | | |
cd hostbill-dna | |
git config user.name "GitHub Actions" | |
git config user.email "actions@github.com" | |
git remote set-url origin https://domainreseller:${PAT}@github.com/domainreseller/hostbill-dna.git | |
git add includes/modules/Domain/domainnameapi/lib/dna1.php | |
git commit -m "Update dna.php from php-dna repo1" | |
git push origin master |