Skip to content

Commit ddaba88

Browse files
authored
chore(ci): automate k0s patches (#1283)
1 parent 607dfb0 commit ddaba88

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Release K0s Patch
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "The tag to build and release"
8+
required: true
9+
10+
jobs:
11+
build-and-release:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
runner: [
16+
{name: ubuntu-latest, arch: amd64},
17+
{name: ec-ubuntu-24.04-arm64, arch: arm64},
18+
]
19+
runs-on: ${{ matrix.runner.name }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
repository: replicatedhq/k0s
25+
ref: refs/tags/${{ github.event.inputs.tag }}
26+
persist-credentials: false
27+
28+
- name: Setup Go
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version-file: go.mod
32+
cache-dependency-path: go.sum
33+
34+
- name: Build k0s
35+
run: |
36+
make bindata
37+
make --touch codegen
38+
make build
39+
40+
- name: Upload build
41+
env:
42+
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
43+
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
44+
AWS_REGION: "us-east-1"
45+
run: |
46+
aws s3 cp k0s s3://custom-k0s-binaries/k0s-${{ github.event.inputs.tag }}-$(go env GOARCH)

0 commit comments

Comments
 (0)