Merge pull request #2849 from Nordix/devel/modernizer #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-fkas-images-action | |
| on: | |
| push: | |
| branches: | |
| - '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 | |
| go mod tidy | |
| - name: Upload artifact of prepared fkas env | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: prepared-fkas | |
| path: hack/fake-apiserver/** | |
| 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" | |
| pushImage: true | |
| artifact-name: prepared-fkas | |
| secrets: | |
| QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | |
| QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |