37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: "Scarf-Processing"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
housekeeping:
|
|
runs-on: ubuntu-latest
|
|
name: "Add to Scarf"
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.BOT_TOKEN }}
|
|
- name: Containers - Fetch new application versions
|
|
env:
|
|
scarf_key: ${{ secrets.SCARF_SECRET }}
|
|
run: |
|
|
PLAIN='jackett'
|
|
|
|
ajson="Accept:application/json"
|
|
credentials="Authorization: Bearer ${scarf_key}"
|
|
CT="Content-Type:application/json"
|
|
|
|
for group in apps dev mirror base; do
|
|
for i in containers/${group}/*; do
|
|
PLAIN=$( echo $i | cut -d'/' -f3 )
|
|
|
|
data='{"name":"tccr/'${PLAIN}'","backendUrl":"https://quay.io/tccr/'${PLAIN}'","longDescription":"","shortDescription":"example description","website":"https://truecharts.org","libraryType":"docker","publicUrl":"https://tccr.io/tccr/'${PLAIN}'"}'
|
|
url="https://scarf.sh/api/v1/packages"
|
|
|
|
curl --header "$ajson" --header "$credentials" --data "$data" --header "$CT" "$url"
|
|
|
|
done
|
|
done
|