Skip to content

Weekly download

Weekly download #37

name: Weekly download
on:
schedule:
- cron: "0 0 * * 1" # every Monday at 00:00 UTC
workflow_dispatch:
jobs:
download:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- name: pypi
- name: npm
- name: dockerhub
steps:
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
id: app-token
with:
app-id: ${{ vars.ELEMENTSINTERACTIVE_BOT_APP_ID }}
private-key: ${{ secrets.ELEMENTSINTERACTIVE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.8.22"
- name: Install the project
run: uv sync --locked --only-group download --python 3.14
- name: Download ${{ matrix.name }} packages
continue-on-error: true
run: |
PYTHONPATH=dependencies/ uv run --no-project dependencies/scripts/download_packages.py download ${{ matrix.name }}
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Push changes to repo
run: |
git add .
# Check if there are uncommitted changes
if git diff-index --quiet HEAD --; then
echo "No changes detected for ${{ matrix.name }}. Skipping commit."
else
git commit -m "chore: Weekly update of ${{ matrix.name }} trusted packages"
git pull --rebase origin main
git push origin HEAD:main
fi