fix
This commit is contained in:
parent
0591e90187
commit
fb6a0e7284
1 changed files with 3 additions and 8 deletions
|
@ -12,11 +12,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install jq
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y jq
|
|
||||||
|
|
||||||
- name: Get latest release and create new release
|
- name: Get latest release and create new release
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -24,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.
|
||||||
year=$(echo $latest_release | awk -F '.' '//{print $1}')
|
release_year=$(echo $latest_release | awk -F '.' '//{print $1}')
|
||||||
month=$(echo $latest_release | awk -F '.' '//{print $2}')
|
release_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 year ] && [ $(date +'%m') -eq month ]; then
|
if [ $(date +'%Y') -eq release_year ] && [ $(date +'%m') -eq release_month ]; then
|
||||||
((counter++));
|
((counter++));
|
||||||
# else reset counter
|
# else reset counter
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue