Skip to content

Commit 358e64a

Browse files
authored
ci: add debian canaries (runfinch#1582)
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 6793e06 commit 358e64a

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

.github/workflows/canary-deb.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Deb Canary
2+
3+
on:
4+
# This workflow will run from the release-automation.yaml automation on each merge
5+
workflow_dispatch:
6+
inputs:
7+
ref_name:
8+
required: true
9+
type: string
10+
workflow_call:
11+
inputs:
12+
ref_name:
13+
required: true
14+
type: string
15+
16+
# This workflow will run every 5 min
17+
schedule:
18+
- cron: '*/5 * * * *'
19+
20+
# This workflow will run when the workflow file is updated
21+
pull_request:
22+
paths:
23+
- '.github/workflows/canary-deb.yaml'
24+
25+
jobs:
26+
get-latest-tag:
27+
name: Get the latest release tag
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 2
30+
outputs:
31+
tag: ${{ steps.latest-tag.outputs.tag }}
32+
steps:
33+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+
with:
35+
fetch-depth: 0
36+
- name: 'Get the latest tag'
37+
id: latest-tag
38+
uses: "WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0
39+
40+
canary-deb:
41+
name: Test Finch APT installation
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 3
44+
needs: get-latest-tag
45+
steps:
46+
- name: Clean ubuntu runner workspace
47+
run: rm -rf ${{ github.workspace }}/*
48+
49+
- name: Install Finch dependencies
50+
run: |
51+
sudo apt-get update
52+
sudo apt install build-essential libseccomp-dev pkg-config zlib1g-dev -y
53+
54+
- name: Add Finch APT Repository
55+
run: |
56+
ARCH=$(dpkg --print-architecture)
57+
echo "Detected architecture: $ARCH"
58+
59+
curl -fsSL https://artifact.runfinch.com/deb/GPG_KEY.pub | sudo gpg --dearmor -o /usr/share/keyrings/runfinch-finch-archive-keyring.gpg
60+
echo "deb [signed-by=/usr/share/keyrings/runfinch-finch-archive-keyring.gpg arch=$ARCH] https://artifact.runfinch.com/deb noble main" | sudo tee /etc/apt/sources.list.d/runfinch-finch.list
61+
sudo apt update
62+
63+
- name: Prepare clean environment for Finch
64+
run: |
65+
sudo apt remove containerd containerd.io docker.io docker-ce docker-ce-cli runc -y || true
66+
sudo apt autoremove -y
67+
68+
- name: Install Finch with APT
69+
run: sudo apt install runfinch-finch -y
70+
71+
- name: Verify version matches latest release
72+
run: |
73+
LATEST_TAG="${{ needs.get-latest-tag.outputs.tag }}"
74+
echo "Latest repository tag: $LATEST_TAG"
75+
76+
INSTALLED_VERSION=$(finch -v)
77+
echo "Installed Finch version: $INSTALLED_VERSION"
78+
79+
EXPECTED_VERSION="finch version $LATEST_TAG"
80+
if [[ "$INSTALLED_VERSION" == "$EXPECTED_VERSION" ]]; then
81+
echo "✅ Version matches: $INSTALLED_VERSION"
82+
else
83+
echo "❌ Version mismatch!"
84+
echo " Expected: $EXPECTED_VERSION"
85+
echo " Found: $INSTALLED_VERSION"
86+
exit 1
87+
fi
88+
89+
- name: Clean up environment
90+
run: sudo apt remove runfinch-finch -y

0 commit comments

Comments
 (0)