flow/forgejo/actions/prep-metadata-query/action.yml

26 lines
1 KiB
YAML

name: Prepare metadata query
runs:
using: "composite"
steps:
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install tools
run: |
# use a single environment for all tools
uv tool install https://hub.psychoinformatics.de/orinoco/query-things.git \
--with-executables-from dump-things-pyclient \
--with-executables-from git-annex
# we need git-annex even when we are not working with annex keys
# the website repository is typically annex-init'ed on-clone, so git-annex tooling
# runs in commit hooks
- name: Prepare Git identity and credential
run: |
git config --global user.name "Forgejo Actions"
git config --global user.email ${{ forgejo.actor }}@${FORGEJO_SERVER_URL#*://}
git config --global credential.helper cache
git credential approve <<EOF
url=${{ forgejo.server_url }}
username=${{ forgejo.actor }}
password=${{ forgejo.token }}
EOF
echo "Set credential for ${{ forgejo.server_url }}: OK"