Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Update

Update #817

Workflow file for this run

name: Update
on:
schedule:
- cron: '30 2 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Download latest release to create a churn.txt. This will fail on a new repo,
# as it won't have a latest release available the first time. So you'll have to
# comment this out the first time you run this in a new repo.
- uses: robinraju/[email protected]
with:
repository: "c4dt/lightarti-directory"
latest: true
fileName: "directory-cache.tgz"
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Fetch tor directory
id: fetch_tor_dir
env:
DIR_AUTH_PASSWORD: ${{ secrets.DIR_AUTH_PASSWORD }}
run: |
sudo apt install -y tor
echo ${{ secrets.AUTHORITY }} |
base64 -d |
tar -C tools -xjv
cd tools
mkdir -p directory-cache
tar xf ../directory-cache.tgz -C directory-cache
make update_cache_churn
tar -C directory-cache -czf directory-cache.tgz .
zip -rj directory-cache.zip directory-cache/
cd ..
date >> body.md
echo "::set-output name=DATE::$(date +%Y-%m-%d)"
- uses: ncipollo/release-action@v1
with:
artifacts: "tools/directory-cache.*, tools/directory-cache/churn.txt"
bodyFile: "body.md"
tag: ${{ steps.fetch_tor_dir.outputs.DATE }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true