Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestl committed Nov 22, 2024
1 parent 8308b77 commit 5156d7a
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/go-channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Find Go channel and version used for snapd build
run: |
yaml="build-aux/snap/snapcraft.yaml"
channel=$(yq '.parts.snapd.build-snaps[] | select(. == "go/*/*") | sub("^go/", "")' $yaml)
version=""
if [[ "$channel" =~ ^[0-9]+\.[0-9]+/(stable|candidate|beta|edge)$ ]]; then
version=$(snap info go | grep "$channel:" | awk '/\/.*:/ {print $2}' | awk "NR==1")
elif [[ "$channel" =~ ^[0-9]+\.[0-9]$ ]]; then
version=$(snap info go | grep "$channel/.*:" | awk '/\/.*:/ {print $2}' | awk "NR==1")
else
echo "Cannot use go channel \"$channel\" extracted from snapd snapcraft.yaml \"$yaml\""
exit 1
fi
echo "=Hello, World!" >> $GITHUB_ENV

- name: Determine Go snap channels
id: determine
run: |
Expand Down

0 comments on commit 5156d7a

Please sign in to comment.