Skip to content

Handle runtime firmware downloads #59

Handle runtime firmware downloads

Handle runtime firmware downloads #59

Workflow file for this run

# SPDX-FileCopyrightText: Copyright 2025 Stacklok, Inc.
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
GOPRIVATE: github.com/stacklok/*
GH_TOKEN: ${{ secrets.GO_MODULE_TOKEN || github.token }}
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-15]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Configure Git for private modules
run: |
git config --global url."https://${{ github.actor }}:${{ secrets.GO_MODULE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Task
uses: go-task/setup-task@v1
- name: Build bbox-init (for go:embed)
run: task build-init
- name: Run tests
run: task test
lint:
name: Lint (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-15]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Configure Git for private modules
run: |
git config --global url."https://${{ github.actor }}:${{ secrets.GO_MODULE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Task
uses: go-task/setup-task@v1
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v9
with:
install-only: true
- name: Build bbox-init (for go:embed)
run: task build-init
- name: Run linter
run: task lint
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-15]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Configure Git for private modules
run: |
git config --global url."https://${{ github.actor }}:${{ secrets.GO_MODULE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Task
uses: go-task/setup-task@v1
- name: Build
run: task build
images:
name: Build Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Task
uses: go-task/setup-task@v1
- name: Build all images
run: task image-all
- name: Log in to GHCR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Push images to GHCR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: task image-push