Skip to content

chore: test deb

chore: test deb #20

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:
get-latest-tag:
name: Get the latest release tag
runs-on: ubuntu-latest
timeout-minutes: 2
outputs:
tag: ${{ steps.latest-tag.outputs.tag }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: 'Get the latest tag'
id: latest-tag
uses: "WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0
canary-deb:
name: Test Finch APT installation
runs-on: ubuntu-latest
timeout-minutes: 3
needs: get-latest-tag
steps:
- name: Clean ubuntu runner workspace
run: rm -rf ${{ github.workspace }}/*
- name: Install Finch dependencies
run: |
sudo apt-get update
sudo apt install build-essential libseccomp-dev pkg-config zlib1g-dev -y
- name: Add Finch APT Repository
run: |
ARCH=$(dpkg --print-architecture)
echo "Detected architecture: $ARCH"
curl -fsSL https://artifact.runfinch.com/deb/GPG_KEY.pub | sudo gpg --dearmor -o /usr/share/keyrings/runfinch-finch-archive-keyring.gpg
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
sudo apt update
- name: Prepare clean environment for Finch
run: |
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: |
LATEST_TAG="${{ needs.get-latest-tag.outputs.tag }}"
echo "Latest repository tag: $LATEST_TAG"
INSTALLED_VERSION=$(finch -v)
echo "Installed Finch version: $INSTALLED_VERSION"
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