Skip to content

Commit

Permalink
handle receiving null dumps from index.json
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceface777 authored Sep 24, 2024
1 parent e930e3b commit 6e474f2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/db_gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ jobs:
id: setup
run: |
sudo apt install -y jq xz-utils libxml2-dev libgc-dev
echo "date=$(curl -L https://dumps.wikimedia.org/index.json | jq --raw-output '.wikis.enwiki.jobs.pagelinkstable.updated | split(" ") | .[0] ')" >> $GITHUB_OUTPUT
date=$(curl -L https://dumps.wikimedia.org/index.json | jq --raw-output '.wikis.${{ matrix.lang }}wiki.jobs.pagelinkstable.updated | split(" ") | .[0]')
if [ -z "$date" ]; then
echo "Error: date is empty"
exit 1
fi
echo "date=$date" >> $GITHUB_OUTPUT
- name: Initialize swapfile
run: |
Expand Down Expand Up @@ -57,7 +64,7 @@ jobs:
aws s3 cp ${{ matrix.lang }}.bin s3://wiki-dbs/${{ matrix.lang }}.bin --endpoint-url ${{ secrets.R2_AWS_ENDPOINT_URL }}
- name: Upload
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.lang }}.bin
tag_name: ${{ steps.setup.outputs.date }}

0 comments on commit 6e474f2

Please sign in to comment.