Files
truecharts/archive/workflows/containers.scarf.yaml
T

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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
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://oci.trueforge.org/tccr/'${PLAIN}'"}'
url="https://scarf.sh/api/v1/packages"
curl --header "$ajson" --header "$credentials" --data "$data" --header "$CT" "$url"
done
done