psyinf-pool-files-public/.forgejo/workflows/upload.yml

33 lines
No EOL
1.1 KiB
YAML

name: upload artifacts
on:
schedule:
- cron: '0 16 * * *'
workflow_dispatch:
env:
DTC_TOKEN: ${{ secrets.POOLTOKEN }}
jobs:
push-artifacts:
name: Upload artifacts to target repo
runs-on: debian-latest
steps:
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Configure Git
run: |
git config --global user.name ${{ forgejo.actor }}
git config --global user.email ${{ forgejo.actor }}@${{ forgejo.server.url }}
git config --global credential.helper 'store --file ~/.git-credentials'
git credential approve <<EOF
url=${{ forgejo.server_url }}
username=${{ forgejo.actor }}
password=${{ forgejo.token }}
EOF
echo OK
- name: Fetch and run script
run: |
wget https://hub.psychoinformatics.de/orinoco/tools/raw/branch/main/code/register-upload.py
# check for files in the protected collection
uv run register-upload.py --dtc-api-url https://pool.psychoinformatics.de/api --dtc-collection public