Skip to content

Commit

Permalink
Added support for bulding arm images with rpi support
Browse files Browse the repository at this point in the history
Signed-off-by: venkatnsrinivasan <[email protected]>
  • Loading branch information
venkatnsrinivasan committed Jan 30, 2023
1 parent 6edc239 commit 23953e2
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 6 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-arm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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-arm-rpi:v1.4.0
k3s-version:
- 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/setup-qemu-action@master
- uses: sigstore/cosign-installer@main
- uses: docker/setup-buildx-action@master
- uses: earthly/actions-setup@v1
with:
version: "latest"
- 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-arm64-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
- run: earthly --ci +cosign-arm64-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}

4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ jobs:
- 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 }}
- run: earthly --ci --push +docker-amd64-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
- run: earthly --ci +cosign-amd64-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}

2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
- uses: earthly/actions-setup@v1
with:
version: "latest"
- run: earthly --ci +docker-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
- run: earthly --ci +docker-amd64-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
7 changes: 4 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ cosign:
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${K3S_VERSION_TAG}
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${K3S_VERSION_TAG}_${VERSION}

docker-all-platforms:
docker-amd64-platforms:
BUILD --platform=linux/amd64 +docker
docker-arm64-platforms:
BUILD --platform=linux/arm64 +docker

cosign-all-platforms:
cosign-amd64-platforms:
BUILD --platform=linux/amd64 +cosign
cosign-arm64-platforms:
BUILD --platform=linux/arm64 +cosign

0 comments on commit 23953e2

Please sign in to comment.