diff --git a/.github/workflows/get-versions-from-newreleases.yaml b/.github/workflows/get-versions-from-newreleases.yaml index 0dcdc8d6..0a526b56 100644 --- a/.github/workflows/get-versions-from-newreleases.yaml +++ b/.github/workflows/get-versions-from-newreleases.yaml @@ -24,13 +24,11 @@ jobs: ls -l projects=$(curl -H "X-Key: $token" \ https://api.newreleases.io/v1/projects) - echo $projects echo $projects > project_json - jq -r '.projects[] | "\(.id) \(.name)"' project_json | while read -r id name; do version=$(curl -H "X-Key: $token" \ https://api.newreleases.io/v1/projects/$id/latest-release) - 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 @@ -38,8 +36,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT_MICHEL }} run: | - git config --global user.email "Github Actions[bot]" - git config --global user.name "GitHub Actions" + 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 "Update versions.json" git push --force