diff --git a/.gitea/workflows/gen.yaml b/.gitea/workflows/gen.yaml index 7a2b350..4ef96f1 100644 --- a/.gitea/workflows/gen.yaml +++ b/.gitea/workflows/gen.yaml @@ -25,14 +25,30 @@ jobs: chmod 600 ~/.ssh/id_ed25519 ssh-keyscan -H git.ssh.uzurka.fr >> ~/.ssh/known_hosts + - name: Clone original repo + run: | + git clone https://github.com/uklans/cache-domains.git + cd cache-domains + + - name: Set config.json + run: | + echo "${{CONFIG_JSON}}" > scripts/config.json + - name: Generate new config run: | - git clone git@git.ssh.uzurka.fr:Uzurka/lancache-adgaurdhome-config.git - cd lancache-adgaurdhome-config - bash scripts/create-adguardhome.sh - git add . - git commit -am "Update lancache domains $(date +%F)" - git push + cd scripts + bash create-adguardhome.sh + + - name: Clone my repo && update it + run: | + cd ../../ + git clone git@git.ssh.uzurka.fr:Uzurka/lancache-adguardhome-config.git + cd lancache-adguardhome-config + mv ../cache-domains/output/adguardhome/* ./ + git config --global user.name "Gitea Actions" + git add lancache.conf + git commit -am "Update lancache domains $(date +%F)" + git push - name: Send ntfy notification (Success) if: success()