diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2585716..e4264a6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,16 @@ concurrency: queue: max jobs: + deploy-actions: + if: github.repository == 'ultralytics/actions' && github.event_name == 'push' + runs-on: ubuntu-latest + permissions: {} + steps: + - name: Redeploy Cloud Run actions service + env: + GH_TOKEN: ${{ secrets._GITHUB_TOKEN }} + run: gh workflow run deploy_cloud_run.yml --repo ultralytics/assistant --ref main -f actions=true + check: if: github.repository == 'ultralytics/actions' && github.actor == 'glenn-jocher' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest diff --git a/actions/__init__.py b/actions/__init__.py index 79faca9..51bb0b8 100644 --- a/actions/__init__.py +++ b/actions/__init__.py @@ -28,4 +28,4 @@ # ├── test_summarize_pr.py # └── ... -__version__ = "0.3.21" +__version__ = "0.3.22" diff --git a/actions/dispatch_actions.py b/actions/dispatch_actions.py index 866f191..e64a475 100644 --- a/actions/dispatch_actions.py +++ b/actions/dispatch_actions.py @@ -144,17 +144,15 @@ def update_comment(event, comment_body: str, command: str, triggered_actions: li timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC") failed = all(action.get("error") for action in triggered_actions) - status = ( - "No GitHub Actions workflows were started" if failed else "GitHub Actions below triggered via workflow dispatch" - ) + status = "No GitHub Actions workflows were started" if failed else "Actions triggered" summary = f""" ## ⚡ Actions Trigger {ACTIONS_CREDIT} -{status} for this PR at {timestamp} with `{command}` command -(available commands are `{RUN_ALL_KEYWORD}`, `{RUN_CI_KEYWORD}`, and `{RUN_DOCKER_KEYWORD}`): +{status} via `{command}` at {timestamp}.
+Commands: `{RUN_ALL_KEYWORD}`, `{RUN_CI_KEYWORD}`, `{RUN_DOCKER_KEYWORD}`. """ diff --git a/tests/test_dispatch_actions.py b/tests/test_dispatch_actions.py index 5a0d838..6026ccb 100644 --- a/tests/test_dispatch_actions.py +++ b/tests/test_dispatch_actions.py @@ -217,10 +217,7 @@ def test_update_comment_function(): assert "Actions Trigger" in kwargs["json"]["body"] assert "CI Workflow" in kwargs["json"]["body"] assert "2023-01-01 12:00:00 UTC" in kwargs["json"]["body"] - assert ( - f"(available commands are `{RUN_ALL_KEYWORD}`, `{RUN_CI_KEYWORD}`, and `{RUN_DOCKER_KEYWORD}`):" - in kwargs["json"]["body"] - ) + assert f"Commands: `{RUN_ALL_KEYWORD}`, `{RUN_CI_KEYWORD}`, `{RUN_DOCKER_KEYWORD}`." in kwargs["json"]["body"] def test_update_comment_skips_empty_actions():