Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/build-fkas-images-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,38 @@ on:
- 'main'
paths:
- 'hack/fake-apiserver/**'
- 'api/**'

permissions:
contents: read

jobs:
prepare:
name: Prepare FKAS build
if: github.repository == 'metal3-io/cluster-api-provider-metal3'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> "${GITHUB_OUTPUT}"
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: Prepare fake-apiserver
run: |
mkdir -p hack/fake-apiserver/capm3
cp -r api/ hack/fake-apiserver/capm3
cd hack/fake-apiserver
go mod edit -replace=github.com/metal3-io/cluster-api-provider-metal3=./capm3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is smart, didn't think about this solution when I was looking into it.

go mod tidy

build_FKAS:
name: Build Metal3-FKAS image
if: github.repository == 'metal3-io/cluster-api-provider-metal3'
needs: prepare
uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main
with:
image-name: "metal3-fkas"
Expand Down