Skip to content

Hourly update

Hourly update #8845

Workflow file for this run

name: Hourly update
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
debian-mirrors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: pip install requests beautifulsoup4
- name: Pull latest changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin main
- name: Generate hash before changes
run: sha256sum debian-mirrors/debian-mirrors.txt > before.txt
- name: Run fetcher script and generate EDL
run: python debian-mirrors/debian-mirrors.py
- name: Generate hash after changes
run: sha256sum debian-mirrors/debian-mirrors.txt > after.txt
- name: Commit and push if changes
run: |
if cmp -s before.txt after.txt; then
echo "No changes to commit"
else
git add debian-mirrors/debian-mirrors.txt
git commit -m "Update Debian Mirror list" -a
git push origin main || echo "Push failed, retrying..." && git pull --rebase origin main && git push origin main
fi
ubuntu-mirrors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: pip install requests beautifulsoup4
- name: Pull latest changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin main
- name: Generate hash before changes
run: sha256sum ubuntu-mirrors/ubuntu-mirrors.txt > before.txt
- name: Run fetcher script and generate EDL
run: python ubuntu-mirrors/ubuntu-mirrors.py
- name: Generate hash after changes
run: sha256sum ubuntu-mirrors/ubuntu-mirrors.txt > after.txt
- name: Commit and push if changes
run: |
if cmp -s before.txt after.txt; then
echo "No changes to commit"
else
git add ubuntu-mirrors/ubuntu-mirrors.txt
git commit -m "Update Ubuntu Mirror list" -a
git push origin main || echo "Push failed, retrying..." && git pull --rebase origin main && git push origin main
fi
docker-domains:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: pip install requests beautifulsoup4
- name: Pull latest changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin main
- name: Generate hash before changes
run: sha256sum docker-domains/docker-domains.txt > before.txt
- name: Run fetcher script and generate EDL
run: python docker-domains/docker-domains.py
- name: Generate hash after changes
run: sha256sum docker-domains/docker-domains.txt > after.txt
- name: Commit and push if changes
run: |
if cmp -s before.txt after.txt; then
echo "No changes to commit"
else
git add docker-domains/docker-domains.txt
git commit -m "Update Docker Domain list" -a
git push origin main || echo "Push failed, retrying..." && git pull --rebase origin main && git push origin main
fi