-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (51 loc) · 1.83 KB
/
weekly_download.yml
File metadata and controls
60 lines (51 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
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@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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