Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/canary-deb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
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
10 changes: 7 additions & 3 deletions .github/workflows/release-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
workflow_dispatch:
workflow_call:

permissions:
id-token: write
contents: write

jobs:
get-latest-tag:
name: Get the latest release tag
Expand Down Expand Up @@ -62,7 +66,7 @@ jobs:
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
id-token: write
contents: read # this is required for actions/checkout
contents: write # this is required for actions/checkout
secrets: inherit
with:
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
Expand All @@ -74,7 +78,7 @@ jobs:
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
id-token: write
contents: read # this is required for actions/checkout
contents: write # this is required for actions/checkout
secrets: inherit
with:
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
Expand All @@ -101,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
contents: write
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
name: release-please

permissions:
contents: read
contents: write
id-token: write
pull-requests: write

jobs:
Expand Down
1 change: 1 addition & 0 deletions cmd/finch/virtual_machine_settings_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
assert.Equal(t, cmd.Name(), "settings")
}

// testing the deb workflow

Check failure on line 29 in cmd/finch/virtual_machine_settings_darwin_test.go

View workflow job for this annotation

GitHub Actions / lint

Comment should end in a period (godot)
func TestSettingsVMAction_runAdapter(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 3 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@
],
"packages": {
".": {}
}
},
"pull-request-header": "Ready for new finch release - Please verify the checklist items in the bottom of this PR before merging",
"pull-request-footer": "-[ ] The Sync Submodules wortkflow has completed successfully in finch-core repo."
}
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> [!IMPORTANT]\n> Please verify the following before merging this PR.\n> -[ ] The Sync Submodules wortkflow has completed successfully in finch-core repo. \n> -[ ] The Sync Submodules and Dependencies Workflow has completed successfully in this repo
Loading