Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#149: bug/event_gather_inputs - support default values for from and to ISO datetime #152

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ on:
from:
description: "Optional ISO formatted string for datetime to begin event gather from."
required: false
default: "" # Will get converted to N (default 2) days prior
to:
description: "Optional ISO formatted string for datetime to end event gather at."
required: false
default: "" # Will get converted to now

permissions:
id-token: write
Expand Down Expand Up @@ -102,6 +100,12 @@ jobs:
if: {% raw %}${{ github.event_name == 'workflow_dispatch' }}{% endraw %}
run: |
cd python/
{% raw %}run_cdp_event_gather event-gather-config.json \
--from ${{ github.event.inputs.from }} \
--to ${{ github.event.inputs.to }}{% endraw %}
CDP_FROM_USER={% raw %}${{ github.event.inputs.from }}{% endraw %}
CDP_FROM_DEFAULT=$(date -Iseconds -d "2 days ago")
CDP_FROM=${CDP_FROM_USER:-$CDP_FROM_DEFAULT}
CDP_TO_USER={% raw %}${{ github.event.inputs.to }}{% endraw %}
CDP_TO_DEFAULT=$(date -Iseconds)
CDP_TO=${CDP_TO_USER:-$CDP_TO_DEFAULT}
run_cdp_event_gather event-gather-config.json \
--from $CDP_FROM \
--to $CDP_TO