You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if os.environ["WORKFLOW_REF"] != expected_ref or os.environ["GITHUB_REF"] != "refs/heads/main":
93
94
raise SystemExit("workflow_identity_invalid")
94
-
if payload.get("id") != int(os.environ["RUN_ID"]) or type(payload.get("run_attempt")) is not int or payload["run_attempt"] != 1:
95
+
attempt = int(os.environ["RUN_ATTEMPT"])
96
+
if not 1 <= attempt <= 9007199254740991 or payload.get("id") != int(os.environ["RUN_ID"]) or type(payload.get("run_attempt")) is not int or payload["run_attempt"] != attempt:
95
97
raise SystemExit("workflow_identity_invalid")
96
98
if payload.get("event") != os.environ["EVENT_NAME"] or payload.get("path") != expected_path or payload.get("head_branch") != "main":
97
99
raise SystemExit("workflow_identity_invalid")
@@ -109,7 +111,7 @@ jobs:
109
111
as_of = end - timedelta(days=1)
110
112
if os.environ["EVENT_NAME"] == "workflow_dispatch" and (os.environ["PERIOD_START"], os.environ["AS_OF"]) != (start.isoformat(), as_of.isoformat()):
for key, value in (("period_start", start.isoformat()), ("period_end_exclusive", end.isoformat()), ("as_of", as_of.isoformat()), ("producer_ref", producer_ref)):
114
+
for key, value in (("period_start", start.isoformat()), ("period_end_exclusive", end.isoformat()), ("as_of", as_of.isoformat()), ("producer_ref", producer_ref), ("source_attempt", str(attempt))):
113
115
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
if git diff --cached --quiet; then echo "No live RSS output changes to commit."; else git commit -m "Update live RSS source events [skip ci]"; git push; fi
164
+
if git diff --cached --quiet; then
165
+
echo "No live RSS output changes to commit."
166
+
else
167
+
git commit -m "Update live RSS source events [skip ci]"
0 commit comments