🌱 Add prep fkas directory -step for fkas-image-build action #71
Workflow file for this run
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@v4 | ||
| - 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 | ||
| 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 | ||
| dockerfile-directory: hack/fake-apiserver | ||
| secrets: | ||
| QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | ||
| QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||