1
0
mirror of https://github.com/kairos-io/provider-rke2.git synced 2025-05-11 01:32:19 +00:00

Added seperate provider package for custom os builds ()

Signed-off-by: venkatnsrinivasan <venkat@spectrocloud.com>
This commit is contained in:
Venkat Srinivasan 2023-03-15 11:59:26 -07:00 committed by GitHub
parent 6c0f09f244
commit 848d315021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View File

@ -19,6 +19,22 @@ jobs:
with:
version: "v0.6.30"
- 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:
runs-on: ubuntu-latest
permissions:

View File

@ -51,6 +51,14 @@ build-provider:
FROM +go-deps
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:
FROM golang:$GOLANG_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}_${VERSION}
provider-package-all-platforms:
BUILD --platform=linux/amd64 +build-provider-package
BUILD --platform=linux/arm64 +build-provider-package