finalize the version parser and updater
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline was successful

This commit is contained in:
Aaron Riedel 2024-09-24 22:45:52 +02:00
parent 0d2eddf78f
commit 8c5e50a095
Signed by: aaron
GPG key ID: 643004654D40D577
2 changed files with 20 additions and 1 deletions

View file

@ -1,7 +1,20 @@
steps: steps:
- name: get versions - name: get versions
image: git.ar21.de/aaron/kustomize-ci:latest image: git.ar21.de/aaron/debian-ci:latest
commands: commands:
- "wget https://git.ar21.de/aaron/nextcloud-docker/raw/branch/master/versions.json" - "wget https://git.ar21.de/aaron/nextcloud-docker/raw/branch/master/versions.json"
- "cat versions.json | jq -r '.[].branch' > versions.txt" - "cat versions.json | jq -r '.[].branch' > versions.txt"
- "cat versions.txt" - "cat versions.txt"
- "git clone https://git.ar21.de/aaron/nextcloud-fpm.git"
- "./patch.sh"
- name: git push changes
image: appleboy/drone-git-push
settings:
branch: main
remote: ssh://git@git.ar21.de:2222/aaron/nextcloud-fpm.git
path: nextcloud-fpm
force: false
commit: true
commit_message: "Update Nextcloud Major versions"
ssh_key:
from_secret: FORGEJO_SSH_KEY

6
patch.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
V_ARRAY=()
while read VERSION; do
V_ARRAY+=(${VERSION})
done <<< $(cat versions.txt)
yq -iY ".matrix.NEXTCLOUD_VERSION = [$(echo "${V_ARRAY[*]}" | sed "s/ /,/g")]" nextcloud-fpm/.woodpecker.yaml