Skip to content

Commit

Permalink
Merge pull request #167 from jnsgruk/candidate
Browse files Browse the repository at this point in the history
Fix architecture parsing for call for testing template
  • Loading branch information
merlijn-sebrechts authored Nov 29, 2023
2 parents 5710161 + b22c4b9 commit e801187
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/snap-store-publish-to-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,16 @@ jobs:
# Declare an array to keep track of the revisions we've seen
revisions=()
# Handle the case where architectures is a simple list of strings
archs="$(cat snap/snapcraft.yaml | yq -r -I=0 -o=json '.architectures[]')"
# Handle the case where architectures is a list of objects
if echo "$archs" | grep -q "build-on"; then
archs="$(cat snap/snapcraft.yaml | yq -r -I=0 -o=json '.architectures[]."build-on"')"
fi
# Iterate over the architectures specified in the snapcraft.yaml
for arch in $(cat snap/snapcraft.yaml | yq '.architectures[]'); do
for arch in $archs; do
rev="$(snapcraft list-revisions "${{ env.SNAP_NAME }}" --arch "$arch" | grep "latest/candidate*" | head -n1 | cut -d' ' -f1)"
revisions+=("$rev")
# Add a row to the HTML table
Expand Down Expand Up @@ -195,7 +203,7 @@ jobs:
.github/vmctl prepare
.github/vmctl exec "sudo snap install ${{ env.SNAP_NAME }} --channel candidate"
.github/vmctl exec "snap run ${{ env.SNAP_NAME }} &>/home/ubuntu/${{ env.SNAP_NAME }}.log &"
sleep 20
sleep 45
- name: Gather screenshots
run: |
Expand Down

0 comments on commit e801187

Please sign in to comment.