snapcrafters / signal-desktop

Unofficial Signal Desktop installer for Linux
https://snapcraft.io/signal-desktop
GNU Affero General Public License v3.0
35 stars 15 forks source link

ci: consolidate stage outputs and build rev/arch table #224

Closed jnsgruk closed 10 months ago

jnsgruk commented 10 months ago

This change makes some changes to how we track the revisions that have been uploaded from stage to stage.

We cannot easily have multiple matrix outputs, which appears to be a known and common issue. This solution relies instead upon simply querying the store for the latest revision of a given architecture in the candidate channel, and using that.

The template has been adjusted to take a single "table" variable, which is a dynamically built HTML table that has a row for each supported architecture -- markdown tables cannot be used here because of how the template engine (mustache) renders '\n'.

There is a very small chance of a race condition if two PRs are merged in quick succession that we could get incorrect rev numbers, but I think that's mitigated by the concurrency controls which mean that only once instance can run at a given time.

This commit includes some drivebys to tidy up existing names and make things easier to reason about.

jnsgruk commented 10 months ago

Oh and this is an example of the template rendering properly on my own branch (albeit with artificial rev numbers cos permissions...): https://github.com/jnsgruk/signal-desktop/issues/17

merlijn-sebrechts commented 10 months ago

Did you add the concurrency settings? https://docs.github.com/en/actions/using-jobs/using-concurrency

By default, it will run multiple in parallel. I'm not sure if we should queue new invocations or cancel previous ones, though. Feel free to make a decision on that as you see fit.

jnsgruk commented 10 months ago

Ah, I thought that was already present! I've added it now :)