Closed MehdiChinoune closed 3 years ago
I just kicked off a run of the action's own CI by upgrading its dependencies (which doesn't otherwise change its behaviour), and the integration test that uploads to the store passed without issue:
https://github.com/snapcore/action-publish/runs/2655591634?check_suite_focus=true
This is using the same revision of Snapcraft as shown in your errors, so it should be hitting the same code paths. Is the project you're working with public? At a minimum, it'd be useful to see the workflow yaml to try and determine what's going on.
Yes, It's public
https://github.com/Makhber/makhber/blob/master/snap/snapcraft.yaml
Just to mention that after I have reverted to build snap using snapcore/action-build everything work as expected. the failure occurs when I build the snap using the destructive mode --destructive-mode
(because it's 60-80% faster than snapcore/action-build)
This is probably the bit causing problems:
My guess is that by running Snapcraft under sudo, it's probably left some files in $HOME
that can't be read by the regular user account.
You could probably work around this by running sudo rm -rf $HOME/.config/snapcraft
before calling action-publish. But I'd strongly suggest using snapcore/action-build@v1
to build your snap. The Github Actions runner VM image is not a clean build environment, having a lot of extra software installed. It avoids these kind of permission problems by running snapcraft as regular CI user account.
This is probably the bit causing problems:
My guess is that by running Snapcraft under sudo, it's probably left some files in
$HOME
that can't be read by the regular user account.You could probably work around this by running
sudo rm -rf $HOME/.config/snapcraft
before calling action-publish. But I'd strongly suggest usingsnapcore/action-build@v1
to build your snap. The Github Actions runner VM image is not a clean build environment, having a lot of extra software installed. It avoids these kind of permission problems by running snapcraft as regular CI user account.
It works.
Build time:
You can see clearly that action-build is very slow.
It was working, but recently it brokes.
I get this:
The snap was built using destructive-mode