Skip to content

Commit

Permalink
Update netbox.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fbouynot authored Apr 8, 2024
1 parent 549dbca commit 03793cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/netbox.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Open Issue when Netbox releases a new version
on:
schedule:
- cron: 51 * * * *
- cron: 06 * * * *

jobs:
create_issue:
Expand All @@ -18,16 +18,14 @@ jobs:
-S '[Chore]: Upgrade Netbox to' \
-L 1 \
--jq '.[0].createdAt')
previous_issue_time=$(date -d $previous_issue_date +%s)
new_release=$(gh release list -R netbox-community/netbox \
--exclude-drafts \
--exclude-pre-releases \
--json publishedAt,tagName \
--jq '.[0]')
new_release_tag=$(echo $new_release | jq '.tagName')
new_release_date=$(echo $new_release | jq '.publishedAt')
new_release_time=$(date -d $new_release_date +%s)
if [ $issue -ge $release ]; then
if [[ "$previous_issue_date" > "$new_release_date" ]]; then
gh issue create \
--title "[Chore]: Upgrade netbox to $new_release_tag" \
--body "$(gh release view $new_release_tag --repo netbox-community/netbox)"
Expand Down

0 comments on commit 03793cd

Please sign in to comment.