Skip to content
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
9 changes: 6 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import pprint
import time
from collections.abc import Generator
from functools import cache, cached_property
from typing import Any
Expand Down Expand Up @@ -147,7 +146,11 @@ def _update_workflow(self, workflow_path: str) -> set[str]:

for action in all_actions:
try:
action_repository, current_version = action.split("@")
action_location, current_version = action.split("@")
# A GitHub Action can be in a subdirectory of a repository
# e.g. `flatpak/flatpak-github-actions/flatpak-builder@v4`.
# we only need `user/repo` part from action_repository
action_repository = "/".join(action_location.split("/")[:2])
except ValueError:
gha_utils.warning(
f'Action "{action}" is in a wrong format, '
Expand All @@ -166,7 +169,7 @@ def _update_workflow(self, workflow_path: str) -> set[str]:
)
continue

updated_action = f"{action_repository}@{new_version}"
updated_action = f"{action_location}@{new_version}"

if action != updated_action:
gha_utils.echo(f'Found new version for "{action_repository}"')
Expand Down