3434 - cron : ' */5 * * * *'
3535
3636jobs :
37+ get-latest-tag :
38+ name : Get the latest release tag
39+ runs-on : ubuntu-latest
40+ timeout-minutes : 2
41+ outputs :
42+ tag : ${{ steps.latest-tag.outputs.tag }}
43+ steps :
44+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45+ with :
46+ fetch-depth : 0
47+ - name : ' Get the latest tag'
48+ id : latest-tag
49+ uses : " WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0
50+
3751 canary-deb :
38- # define all different arch's our supported CodeBuild fleets can run on
52+ name : Test Finch APT installation
3953 runs-on : ubuntu-latest
4054 timeout-minutes : 3
55+ needs : get-latest-tag
4156 steps :
42- - name : Clean ubuntu runner workspace
43- run : |
44- rm -rf ${{ github.workspace }}/*
45- - name : Install Finch with APT
46- run : |
47- sudo apt install runfinch-finch -y
48- - name : Verify version
49- run : |
50- version=$(finch -v)
51- if [[ $version == "finch version ${{inputs.ref_name}}" ]]; then
52- echo "Version matches: $version"
53- else
54- echo "Version mismatch. Found: $version, Expected: ${{inputs.ref_name}}"
55- exit 1
56- fi
57- - name : Clean up environment
58- run : |
59- sudo apt remove runfinch-finch -y
57+ - name : Clean ubuntu runner workspace
58+ run : rm -rf ${{ github.workspace }}/*
59+
60+ - name : Install Finch dependencies
61+ run : |
62+ sudo apt-get update
63+ sudo apt install build-essential libseccomp-dev pkg-config zlib1g-dev -y
64+
65+ - name : Add Finch APT Repository
66+ run : |
67+ ARCH=$(dpkg --print-architecture)
68+ echo "Detected architecture: $ARCH"
69+
70+ curl -fsSL https://artifact.runfinch.com/deb/GPG_KEY.pub | sudo gpg --dearmor -o /usr/share/keyrings/runfinch-finch-archive-keyring.gpg
71+ 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
72+ sudo apt update
73+
74+ - name : Prepare clean environment for Finch
75+ run : |
76+ sudo apt remove containerd containerd.io docker.io docker-ce docker-ce-cli runc -y || true
77+ sudo apt autoremove -y
78+
79+ - name : Install Finch with APT
80+ run : sudo apt install runfinch-finch -y
81+
82+ - name : Verify version matches latest release
83+ run : |
84+ LATEST_TAG="${{ needs.get-latest-tag.outputs.tag }}"
85+ echo "Latest repository tag: $LATEST_TAG"
86+
87+ INSTALLED_VERSION=$(finch -v)
88+ echo "Installed Finch version: $INSTALLED_VERSION"
89+
90+ EXPECTED_VERSION="finch version $LATEST_TAG"
91+ if [[ "$INSTALLED_VERSION" == "$EXPECTED_VERSION" ]]; then
92+ echo "✅ Version matches: $INSTALLED_VERSION"
93+ else
94+ echo "❌ Version mismatch!"
95+ echo " Expected: $EXPECTED_VERSION"
96+ echo " Found: $INSTALLED_VERSION"
97+ exit 1
98+ fi
99+
100+ - name : Clean up environment
101+ run : sudo apt remove runfinch-finch -y
0 commit comments