canonical / pebble

Take control of your internal daemons!
https://canonical-pebble.readthedocs-hosted.com/
GNU General Public License v3.0
143 stars 54 forks source link

fix: allow local building and testing of the snap on PRs #326

Closed cjdcordeiro closed 9 months ago

cjdcordeiro commented 10 months ago

The snap workflows can't currently run for PRs created from forks, since the repo's policy is not to allow forks to access any secrets.

The caveat here is that, for PRs, we won't be able to assert if the snap can build for architectures other than the GH's runner.arch. I don't think there's a way around this since the multi-arch build relies on LP, and for that we always need credentials.

To be fair, the same would happen if we still had the Snap store connected to this repo, since the multi-arch builds would also only happen on push to master.

In this PR

The snap.yaml workflow builds the snap with basis on the type of event triggering the workflow:

benhoyt commented 9 months ago

Looks good to me. Merged without further review -- this is CI only so easy to tweak later if necessary.