name: "Scarf-Processing" on: workflow_dispatch: jobs: housekeeping: runs-on: ubuntu-latest name: "Add to Scarf" steps: - name: Checkout branch uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 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