mirror of
https://github.com/kairos-io/provider-rke2.git
synced 2025-08-27 09:28:45 +00:00
Added seperate provider package for custom os builds (#31)
Signed-off-by: venkatnsrinivasan <venkat@spectrocloud.com>
This commit is contained in:
parent
6c0f09f244
commit
848d315021
16
.github/workflows/pull_request.yaml
vendored
16
.github/workflows/pull_request.yaml
vendored
@ -19,6 +19,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: "v0.6.30"
|
version: "v0.6.30"
|
||||||
- run: earthly --ci +lint
|
- run: earthly --ci +lint
|
||||||
|
build-provider-package:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: docker-practice/actions-setup-docker@master
|
||||||
|
- uses: earthly/actions-setup@v1
|
||||||
|
with:
|
||||||
|
version: "v0.6.30"
|
||||||
|
- uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- run: earthly --ci +provider-package-all-platforms --IMAGE_REPOSITORY=ghcr.io/kairos-io
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
12
Earthfile
12
Earthfile
@ -51,6 +51,14 @@ build-provider:
|
|||||||
FROM +go-deps
|
FROM +go-deps
|
||||||
DO +BUILD_GOLANG --BIN=agent-provider-rke2 --SRC=main.go
|
DO +BUILD_GOLANG --BIN=agent-provider-rke2 --SRC=main.go
|
||||||
|
|
||||||
|
build-provider-package:
|
||||||
|
DO +VERSION
|
||||||
|
ARG VERSION=$(cat VERSION)
|
||||||
|
FROM scratch
|
||||||
|
COPY +build-provider/agent-provider-rke2 /system/providers/agent-provider-rke2
|
||||||
|
COPY scripts /opt/rke2/scripts
|
||||||
|
SAVE IMAGE --push $IMAGE_REPOSITORY/provider-rke2:${VERSION}
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
FROM golang:$GOLANG_VERSION
|
FROM golang:$GOLANG_VERSION
|
||||||
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $GOLINT_VERSION
|
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $GOLINT_VERSION
|
||||||
@ -120,3 +128,7 @@ cosign:
|
|||||||
|
|
||||||
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-rke2:${RKE2_VERSION_TAG}
|
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-rke2:${RKE2_VERSION_TAG}
|
||||||
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-rke2:${RKE2_VERSION_TAG}_${VERSION}
|
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-rke2:${RKE2_VERSION_TAG}_${VERSION}
|
||||||
|
|
||||||
|
provider-package-all-platforms:
|
||||||
|
BUILD --platform=linux/amd64 +build-provider-package
|
||||||
|
BUILD --platform=linux/arm64 +build-provider-package
|
||||||
|
Loading…
Reference in New Issue
Block a user