diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 7363a37..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Publish - -on: - push: - tags: - - v* - -jobs: - images: - runs-on: ubuntu-latest - permissions: - id-token: write - strategy: - matrix: - base-image: - - quay.io/kairos/core-opensuse-leap:v2.3.2 - - quay.io/kairos/core-ubuntu-20-lts:v2.3.2 - - quay.io/kairos/core-ubuntu-22-lts:v2.3.2 - k3s-version: - - v1.26.4+k3s1 - - v1.25.2+k3s1 - - v1.25.0+k3s1 - - v1.24.6+k3s1 - - v1.24.4+k3s1 - - v1.23.12+k3s1 - - v1.23.10+k3s1 - - v1.22.15+k3s1 - - v1.22.13+k3s1 - env: - REGISTRY: quay.io - REGISTRY_USER: ${{ secrets.QUAY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - steps: - - uses: actions/checkout@v2 - - uses: docker-practice/actions-setup-docker@master - - uses: earthly/actions-setup@v1 - with: - version: "v0.6.30" - - run: echo $REGISTRY_PASSWORD | docker login -u $REGISTRY_USER --password-stdin $REGISTRY - - run: env | grep ACTIONS_ID_TOKEN_REQUEST > .env - - run: env | grep REGISTRY >> .env - - run: earthly --ci --push +docker-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }} - - run: earthly --ci +cosign-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }} - diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 6e3849e..6bf94ac 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -34,23 +34,4 @@ jobs: 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: - id-token: write - strategy: - matrix: - base-image: - - quay.io/kairos/core-opensuse-leap:v2.3.2 - - quay.io/kairos/core-ubuntu-20-lts:v2.3.2 - - quay.io/kairos/core-ubuntu-22-lts:v2.3.2 - k3s-version: - - v1.25.0+k3s1 - steps: - - uses: actions/checkout@v2 - - uses: docker-practice/actions-setup-docker@master - - uses: earthly/actions-setup@v1 - with: - version: "v0.6.30" - - run: earthly --ci +docker-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }} + - run: earthly --ci +provider-package-all-platforms --IMAGE_REPOSITORY=ghcr.io/kairos-io \ No newline at end of file diff --git a/.github/workflows/provider-packaging.yaml b/.github/workflows/release.yaml similarity index 100% rename from .github/workflows/provider-packaging.yaml rename to .github/workflows/release.yaml diff --git a/.gitignore b/.gitignore index b3524b3..b67ce98 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ build/ # Output of the go coverage tool, specifically when used with LiteIDE *.out -.local \ No newline at end of file +.local +.DS_Store diff --git a/api/k3s_config.go b/api/k3s_config.go index a2e508c..e09af38 100644 --- a/api/k3s_config.go +++ b/api/k3s_config.go @@ -1,8 +1,7 @@ package api type K3sServerConfig struct { - // ClusterInit must not have an omitempty tag, otherwise it is elided by JSON/YAML encoders when false. - ClusterInit bool `yaml:"cluster-init" json:"cluster-init"` + ClusterInit bool `yaml:"cluster-init,omitempty" json:"cluster-init,omitempty"` Token string `yaml:"token,omitempty" json:"token,omitempty"` Server string `yaml:"server,omitempty" json:"server,omitempty"` TLSSan []string `yaml:"tls-san,omitempty" json:"tls-san,omitempty"`