Merge pull request #86 from bfritz/disable_k0s_worker_on_amd64 #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main, staging, trying] | |
workflow_dispatch: {} | |
jobs: | |
test-scripts: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- name: install linters | |
run: sudo apt-get install -y shellcheck | |
- name: lint | |
run: just lint | |
- name: test | |
run: just test | |
build-image-build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- name: setup qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: setup docker | |
uses: docker/setup-buildx-action@v3 | |
- name: build multi-platform alpine-build image | |
run: | | |
just build-image-build --build-arg BUILD_USER_UID=$(id -u) --platform linux/amd64 -o type=docker,dest=- > /tmp/builder-linux_amd64.tar | |
just build-image-build --build-arg BUILD_USER_UID=$(id -u) --platform linux/arm64 -o type=docker,dest=- > /tmp/builder-linux_arm64.tar | |
just build-image-build --build-arg BUILD_USER_UID=$(id -u) --platform linux/arm/v6 -o type=docker,dest=- > /tmp/builder-linux_arm_v6.tar | |
- name: upload multi-platform alpine-build image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: builder | |
path: /tmp/builder-*.tar | |
image-build: | |
needs: [test-scripts, build-image-build] | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# The k0s-worker build on amd64 is currently failing with: | |
# | |
# Unable to find image 'alpine-builder:3.21-latest' locally | |
# docker: Error response from daemon: pull access denied for alpine-builder, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. | |
# See 'docker run --help'. | |
# error: Recipe `abuild-keygen` failed on line 74 with exit code 125 | |
# Error: Process completed with exit code 125. | |
# - image: k0s-worker | |
# platform: linux/amd64 | |
- image: rpi-basic | |
platform: linux/arm/v6 | |
- image: rpi-basic | |
platform: linux/arm64 | |
- image: rpi-firewall | |
platform: linux/arm64 | |
- image: rpi-k0s-controller | |
platform: linux/arm64 | |
- image: rpi-ruuvi | |
platform: linux/arm/v6 | |
- image: rpi-snapcast-client | |
platform: linux/arm/v6 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- name: setup qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: download alpine-build image | |
uses: actions/download-artifact@v4 | |
with: | |
name: builder | |
path: /tmp | |
- name: load alpine-build image | |
run: | | |
cat /tmp/builder-linux_amd64.tar | docker load | |
cat /tmp/builder-linux_arm64.tar | docker load | |
cat /tmp/builder-linux_arm_v6.tar | docker load | |
- name: build ${{ matrix.image }} | |
env: | |
# from `wpa_passphrase test_essid supersecret` | |
HL_WIFI_SSID: "test_essid" | |
HL_WIFI_PSK: "40faa8d23b3cf02b10e0f06cd69e179dfad59db25761909c3ecfdaa49bad53d0" | |
run: | | |
just aports-refresh | |
just abuild-keygen --platform ${{ matrix.platform }} | |
just build ${{ matrix.image }} ${{ matrix.platform }} | |
# - name: list-images-content | |
# run: make list-images-content | |
# The bors bot should only merge if the full matrix of images build successfully. | |
# See: | |
# * https://forum.bors.tech/t/bors-with-github-workflows/426/3 | |
# * https://github.com/taiki-e/pin-project/blob/v1.0.10/.github/workflows/ci.yml#L111-L129 | |
# * https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 | |
end-success: | |
name: bors build finished | |
needs: image-build | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: mark as success | |
if: github.event_name == 'push' && success() | |
run: exit 0 | |
- name: mark as failure | |
if: github.event_name == 'push' && !success() | |
run: exit 1 |