From 0051732a55660fcafaf4e3d1209d5428371cc0a3 Mon Sep 17 00:00:00 2001 From: Lucas Gameiro Borges Date: Thu, 26 Sep 2024 22:43:57 +0000 Subject: [PATCH] try parsing output --- .github/workflows/fetch_snaps.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fetch_snaps.yaml b/.github/workflows/fetch_snaps.yaml index 823df8cd..a581e6a2 100644 --- a/.github/workflows/fetch_snaps.yaml +++ b/.github/workflows/fetch_snaps.yaml @@ -53,4 +53,8 @@ jobs: juju deploy ./releases/latest/postgresql-bundle.yaml sleep 1000 juju status - juju exec --all -- snap list \ No newline at end of file + juju exec --all -- snap list -o snaps.txt + cat ./snaps.txt + cat ./snaps.txt | awk '! /^[0-9]/ && $1 != "Name" { print $1, $3, $4 }' | sort | uniq > output.txt + snap info canonical-livepatch | awk '/^channels:/ {found=1; next} found && $1 != "" {print $1, $2; exit}' >> output.txt + cat ./output.txt