File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22import pprint
3- import time
43from collections .abc import Generator
54from functools import cache , cached_property
65from typing import Any
@@ -147,7 +146,11 @@ def _update_workflow(self, workflow_path: str) -> set[str]:
147146
148147 for action in all_actions :
149148 try :
150- action_repository , current_version = action .split ("@" )
149+ action_location , current_version = action .split ("@" )
150+ # A GitHub Action can be in a subdirectory of a repository
151+ # e.g. `flatpak/flatpak-github-actions/flatpak-builder@v4`.
152+ # we only need `user/repo` part from action_repository
153+ action_repository = "/" .join (action_location .split ("/" )[:2 ])
151154 except ValueError :
152155 gha_utils .warning (
153156 f'Action "{ action } " is in a wrong format, '
@@ -166,7 +169,7 @@ def _update_workflow(self, workflow_path: str) -> set[str]:
166169 )
167170 continue
168171
169- updated_action = f"{ action_repository } @{ new_version } "
172+ updated_action = f"{ action_location } @{ new_version } "
170173
171174 if action != updated_action :
172175 gha_utils .echo (f'Found new version for "{ action_repository } "' )
You can’t perform that action at this time.
0 commit comments