fix
This commit is contained in:
parent
fb6a0e7284
commit
268e8d72e2
1 changed files with 3 additions and 3 deletions
|
@ -19,12 +19,12 @@ jobs:
|
||||||
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\?limit\=1 | jq -r '.[] | .tag_name')
|
||||||
|
|
||||||
# Cut release into year, month and counter.
|
# Cut release into year, month and counter.
|
||||||
release_year=$(echo $latest_release | awk -F '.' '//{print $1}')
|
year=$(echo $latest_release | awk -F '.' '//{print $1}')
|
||||||
release_month=$(echo $latest_release | awk -F '.' '//{print $2}')
|
month=$(echo $latest_release | awk -F '.' '//{print $2}')
|
||||||
counter=$(echo $latest_release | awk -F '.' '//{print $3}')
|
counter=$(echo $latest_release | awk -F '.' '//{print $3}')
|
||||||
|
|
||||||
# increase the counter, if the release is from the same year and month
|
# increase the counter, if the release is from the same year and month
|
||||||
if [ $(date +'%Y') -eq release_year ] && [ $(date +'%m') -eq release_month ]; then
|
if [ $(date +'%Y') -eq $year ] && [ $(date +'%m') -eq $month ]; then
|
||||||
((counter++));
|
((counter++));
|
||||||
# else reset counter
|
# else reset counter
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue