diff --git a/action.yml b/action.yml index 32a3441..64aa6dc 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,9 @@ runs: fi if [ -f output_file ]; then echo "IS_CHANGE=true" >> $GITHUB_ENV - if [ -d snap ]; then + if [ -f rockcraft.yaml ]; then + mv output_file rockcraft.yaml + elif [ -d snap ]; then mv output_file snap/snapcraft.yaml else mv output_file snapcraft.yaml diff --git a/updatesnap/updatesnapyaml.py b/updatesnap/updatesnapyaml.py index 1ada5cd..755c72d 100755 --- a/updatesnap/updatesnapyaml.py +++ b/updatesnap/updatesnapyaml.py @@ -54,6 +54,12 @@ def get_yaml_file(self, project_url): data = self._github.get_file(project_url, yaml_path) except (ValueError, ConnectionError): data = None + if not data: + yaml_path = 'rockcraft.yaml' + try: + data = self._github.get_file(project_url, yaml_path) + except (ValueError, ConnectionError): + data = None return data