Merge pull request 'dev' (#8) from dev into main
All checks were successful
build image / release_tag (push) Successful in 2s
build image / build (push) Successful in 5m20s
build image / publish_release (push) Successful in 3s

Reviewed-on: https://git.smail.koeln/homelab/docker-ownDynDNS-netcup/pulls/8
This commit is contained in:
sujiba 2024-07-09 10:04:44 +00:00
commit d04a7875b4
2 changed files with 4 additions and 6 deletions

View file

@ -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\?limit\=1 | jq -r '.[] | .tag_name')
latest_release=$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases/latest | jq -r .tag_name)
# Cut release into year, month and counter.
year=$(echo $latest_release | awk -F '.' '//{print $1}')
@ -88,8 +88,7 @@ jobs:
shell: bash
run: |
# Get latest release "created at" timestemp
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')")
latest_release_time=$(date -d "$(curl -s https://git.smail.koeln/api/v1/repos/homelab/docker-ownDynDNS-netcup/releases/latest | jq -r .created_at)")
echo "Last release from $latest_release_time"
# Get last 50 commits
@ -125,8 +124,8 @@ jobs:
# Generate release message
datetime=$(env TZ=Europe/Berlin date "+%A, %d.%m.%Y at %R")
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')"
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')"
echo "$body"
# Create release
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"
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"

View file

@ -1 +0,0 @@
2024.06.0