Skip to content

Merge pull request #282 from techulus/feat/release-artifact-integrity #64

Merge pull request #282 from techulus/feat/release-artifact-integrity

Merge pull request #282 from techulus/feat/release-artifact-integrity #64

Workflow file for this run

name: Updater CI
on:
pull_request:
paths:
- "deployment/compose.postgres.yml"
- "deployment/updater/**"
- ".github/workflows/updater-ci.yml"
push:
branches:
- main
paths:
- "deployment/compose.postgres.yml"
- "deployment/updater/**"
- ".github/workflows/updater-ci.yml"
permissions:
contents: read
concurrency:
group: updater-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: blacksmith-2vcpu-ubuntu-2404
defaults:
run:
working-directory: deployment/updater
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: deployment/updater/go.mod
cache-dependency-path: deployment/updater/go.mod
- name: Test
run: go test ./...
- name: Vet
run: go vet ./...
- name: Install staticcheck
run: GOBIN=$PWD/.bin go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Staticcheck
run: ./.bin/staticcheck ./...
build:
runs-on: blacksmith-2vcpu-ubuntu-2404
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
defaults:
run:
working-directory: deployment/updater
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: deployment/updater/go.mod
cache-dependency-path: deployment/updater/go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
mkdir -p dist
go build -o dist/control-plane-updater-${{ matrix.goos }}-${{ matrix.goarch }} .
image:
runs-on: blacksmith-2vcpu-ubuntu-2404
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
defaults:
run:
working-directory: deployment/updater
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build updater image
run: docker buildx build --pull --load --platform "${{ matrix.platform }}" --tag techulus-cloud-updater:test .