Skip to content

Commit

Permalink
✨ Prevent CI workflows from running on a latest changes commit, add `…
Browse files Browse the repository at this point in the history
…[skip ci]` to commit message (#76)

This will prevent ci being run on commits from latest-changes.

See: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/skipping-workflow-runs
  • Loading branch information
patrick91 authored Nov 7, 2024
1 parent cbb4e76 commit dae3270
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion latest_changes/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
from pydantic import BaseModel, SecretStr
from pydantic_settings import BaseSettings

COMMIT_MESSAGE = """
📝 Update release notes
[skip ci]
""".strip()

class Section(BaseModel):
label: str
Expand Down Expand Up @@ -248,7 +253,7 @@ def main() -> None:
subprocess.run(
["git", "add", str(settings.input_latest_changes_file)], check=True
)
subprocess.run(["git", "commit", "-m", "📝 Update release notes"], check=True)
subprocess.run(["git", "commit", "-m", COMMIT_MESSAGE], check=True)
logging.info(f"Pushing changes: {settings.input_latest_changes_file}")

result = subprocess.run(["git", "push"])
Expand Down

0 comments on commit dae3270

Please sign in to comment.