Skip to content

chore: test deb

chore: test deb #19

Workflow file for this run

name: Deb Canary
on:
# This workflow will run from the release-automation.yaml automation on each merge
workflow_dispatch:
inputs:
ref_name:
required: true
type: string
workflow_call:
inputs:
ref_name:
required: true
type: string
pull_request:
branches:
- main
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/e2e-macos.yaml'
- '.github/workflows/e2e-windows.yaml'
- '.github/workflows/e2e-linux.yaml'
- 'contrib/packaging/**'
- 'deps/**'
- 'finch.yaml.d/**'
- 'winres'
- 'Makefile*'
- '.golangci.yaml'
- '!contrib/hello-finch/**'
# This workflow will run every 5 min
schedule:
- cron: '*/5 * * * *'
jobs:
canary-deb:
# define all different arch's our supported CodeBuild fleets can run on
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Clean ubuntu runner workspace
run: |
rm -rf ${{ github.workspace }}/*
- name: Install Finch deps
run: |
sudo apt-get update
sudo apt install build-essential -y
sudo apt install libseccomp-dev -y
sudo apt install pkg-config -y
sudo apt install zlib1g-dev -y
- name: Add Finch APT Repository
run: |
# Detect system architecture
ARCH=$(dpkg --print-architecture)
echo "Detected architecture: $ARCH"
# Download and install GPG key
curl -fsSL https://artifact.runfinch.com/deb/GPG_KEY.pub | sudo gpg --dearmor -o /usr/share/keyrings/runfinch-finch-archive-keyring.gpg
# Add repository with detected architecture
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
# Update package lists
sudo apt update
- name: Prepare clean environment for Finch
run: |
# Remove any existing container runtimes that might conflict
sudo apt remove containerd containerd.io docker.io docker-ce docker-ce-cli runc -y || true
sudo apt autoremove -y
- name: Install Finch with APT
run: |
sudo apt install runfinch-finch -y
- name: Verify version matches latest release
run: |
# Get the latest tag from the repository
LATEST_TAG=$(git ls-remote --tags --sort=-version:refname https://github.com/runfinch/finch.git | head -n1 | cut -d/ -f3)
echo "Latest repository tag: $LATEST_TAG"
# Get installed Finch version
INSTALLED_VERSION=$(finch -v)
echo "Installed Finch version: $INSTALLED_VERSION"
# Compare versions
EXPECTED_VERSION="finch version $LATEST_TAG"
if [[ "$INSTALLED_VERSION" == "$EXPECTED_VERSION" ]]; then
echo "✅ Version matches: $INSTALLED_VERSION"
else
echo "❌ Version mismatch!"
echo " Expected: $EXPECTED_VERSION"
echo " Found: $INSTALLED_VERSION"
exit 1
fi
- name: Clean up environment
run: |
sudo apt remove runfinch-finch -y