Skip to content

Update copy.yml

Update copy.yml #27

Workflow file for this run

name: Update Domain
on:
push:
branches:
- main
jobs:
copy_domains:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git remote set-url origin "https://${{ secrets.GH_TOKEN }}@github.com/lepasid/blocklist.git"
- name: Set up time zone
run: export TZ=Asia/Jakarta
- name: Update Domains
run: |
FILE_NAME=$(date +"%Y-%m-%d")
if [ -e "$FILE_NAME" ]; then
rm "$FILE_NAME"
fi
git checkout main -- domains
mv domains "$FILE_NAME"
git add .
git add "$FILE_NAME"
git commit -m "Update on $FILE_NAME"
git push -u origin 2024