Skip to content

Commit

Permalink
POL-1189 Change History Schedule Fix (#2014)
Browse files Browse the repository at this point in the history
* update

* fix

* update

* fix
  • Loading branch information
XOmniverse authored Apr 2, 2024
1 parent cc28671 commit 2cb8fc7
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate-aws-ec2-pricing-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# At 00:00 UTC on Sundays
- cron: "0 0 * * 0"
# At 02:00 UTC on Sundays
- cron: "0 2 * * 0"

# Workflow dispatch trigger allows manually running workflow
workflow_dispatch: {}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-aws-rds-pricing-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# At 00:00 UTC on Sundays
- cron: "0 0 * * 0"
# At 03:00 UTC on Sundays
- cron: "0 3 * * 0"

# Workflow dispatch trigger allows manually running workflow
workflow_dispatch: {}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-azure-md-pricing-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# At 00:00 UTC on Sundays
- cron: "0 0 * * 0"
# At 04:00 UTC on Sundays
- cron: "0 4 * * 0"

# Workflow dispatch trigger allows manually running workflow
workflow_dispatch: {}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-azure-vm-pricing-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# At 00:00 UTC on Sundays
- cron: "0 0 * * 0"
# At 05:00 UTC on Sundays
- cron: "0 5 * * 0"

# Workflow dispatch trigger allows manually running workflow
workflow_dispatch: {}
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/update-change-history.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: Update Change History

on:
# Trigger this workflow on pushes to master
push:
branches:
- master
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# At 01:00 UTC on Sundays
- cron: "0 1 * * 0"

# Workflow dispatch trigger allows manually running workflow
workflow_dispatch:
branches:
- master
workflow_dispatch: {}

jobs:
change-history:
Expand Down
2 changes: 1 addition & 1 deletion tools/change_history/generate_change_history.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Also sort the list by date with the most recent PRs coming first
merged_pull_requests = github_client.pull_requests(repo_name, state: 'closed').select do |pr|
# Omit PRs triggered by this script to avoid an infinite loop
pr.merged_at && pr.base.ref == 'master' && pr.title.strip != "Update Change History"
pr.merged_at && pr.base.ref == 'master'
end.sort_by(&:merged_at).reverse

# Convert the API results into a simple object
Expand Down

0 comments on commit 2cb8fc7

Please sign in to comment.