Merge branch 'main' of https://github.com/community-scripts/ProxmoxVED
This commit is contained in:
commit
da16247176
@ -21,22 +21,25 @@ jobs:
|
||||
env:
|
||||
token: ${{ secrets.NEWRELEASES_TOKEN }}
|
||||
run: |
|
||||
projects=$(curl -H "X-Key: $TOKEN" \
|
||||
ls -l
|
||||
projects=$(curl -H "X-Key: $token" \
|
||||
https://api.newreleases.io/v1/projects)
|
||||
echo $projects > project_json
|
||||
|
||||
jq -r '.projects[] | "\(.id) \(.name)"' project_json | while read -r id name; do
|
||||
version=$(curl -H "X-Key: $TOKEN" \
|
||||
version=$(curl -H "X-Key: $token" \
|
||||
https://api.newreleases.io/v1/projects/$id/latest-release)
|
||||
ls -l
|
||||
echo "Project Name: $name, Project ID: $id, Version: $version"
|
||||
|
||||
jq -n --arg name "$name" --arg version "$version" '{name: $name, version: $version}' > json/versions.json
|
||||
done
|
||||
|
||||
- name: Commit JSON
|
||||
env:
|
||||
TOKEN: ${{ secrets.PAT_MICHEL }}
|
||||
run: |
|
||||
git config --global user.email "Github Actions[bot]"
|
||||
git config --global user.name "GitHub Actions"
|
||||
gh auth login --with-token <<< $TOKEN
|
||||
gh auth status
|
||||
git config --global user.email "michel.roegl-brunner@htl-braunau.at"
|
||||
git config --global user.name "GitHub Actions[bot]"
|
||||
git add json/versions.json
|
||||
git commit -m "Add new script"
|
||||
git push
|
||||
git commit -m "Update versions.json"
|
||||
git push --force
|
||||
|
Loading…
x
Reference in New Issue
Block a user