initial work on adding container CI

This commit is contained in:
Kjeld Schouten
2024-10-07 19:41:13 +02:00
parent 0c75709b3b
commit 82262d1b1d
9 changed files with 34 additions and 163 deletions
@@ -0,0 +1,36 @@
name: "Housekeeping"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/housekeeping.yaml"
schedule:
- cron: "0 1 * * *"
jobs:
housekeeping:
runs-on: ubuntu-latest
name: "Housekeeping"
steps:
- name: Checkout branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
token: ${{ secrets.BOT_TOKEN }}
- name: Containers - Fetch new application versions
run: |
find ./apps -maxdepth 1 -mindepth 1 -type d -exec basename {} \; | while read app; do
bash ./.github/scripts/update-version-file.sh "${app}"
done
- name: Commit and Push Housekeeping
run: |
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Daily Housekeeping" || exit 0
git push
+36
View File
@@ -0,0 +1,36 @@
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