Skip to content

Update copy.yml

Update copy.yml #24

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 "[email protected]"
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
cp domains "$FILE_NAME"
git add "$FILE_NAME"
git commit -m "Update on $FILE_NAME"
git push -u origin 2024