diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 8186002..c8bdb18 100755 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -19,7 +19,7 @@ jobs: shell: bash run: | # Get latest release. - latest_release=$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases/latest | jq -r .tag_name) + latest_release=$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases\?limit\=1 | jq -r '.[] | .tag_name') # Cut release into year, month and counter. year=$(echo $latest_release | awk -F '.' '//{print $1}') @@ -88,7 +88,8 @@ jobs: shell: bash run: | # Get latest release "created at" timestemp - latest_release_time=$(date -d "$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases/latest | jq -r .created_at)") + latest_release=$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases\?limit\=1 | jq -r '.[] | .tag_name') + latest_release_time=$(date -d "$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases\?limit\=1 | jq -r '.[] | .created_at')") echo "Last release from $latest_release_time" # Get last 50 commits @@ -124,8 +125,8 @@ jobs: # Generate release message datetime=$(env TZ=Europe/Berlin date "+%A, %d.%m.%Y at %R") - body="Automatically created on $datetime by forgejo action \\n\\n $i commit(s) since last relase:\\n\\n$(echo $message_list | sed 's/"//g' | sed 's/README.md docker-build docker-compose.yaml example.config renovate.json/*/g')" + body="Create automatically on $datetime by forgejo action \\n\\n $i commit(s) since relase $latest_release:\\n\\n$(echo $message_list | sed 's/"//g' | sed 's/README.md docker-build docker-compose.yaml example.config renovate.json/*/g')" echo "$body" # Create release - curl -d "{\"body\": \"$body\", \"name\": \"$NEW_RELEASE\", \"tag_name\": \"$NEW_RELEASE\", \"target_commitish\": \"main\" }" https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases -H "Authorization: token $GH_TOKEN" -H "Content-Type: application/json" \ No newline at end of file + curl -d "{\"body\": \"$body\", \"tag_name\": \"$NEW_RELEASE\", \"target_commitish\": \"main\" }" https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases -H "Authorization: token $GH_TOKEN" -H "Content-Type: application/json" \ No newline at end of file diff --git a/docker-build/VERSION b/docker-build/VERSION new file mode 100755 index 0000000..aa252b0 --- /dev/null +++ b/docker-build/VERSION @@ -0,0 +1 @@ +2024.06.0