Merge pull request #84 from bfritz/update_alpine #178
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-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install linters | |
run: sudo apt-get install -y shellcheck | |
- name: lint | |
run: make lint | |
- name: test | |
run: make test | |
build-images: | |
needs: test-scripts | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- k0s-worker-x86_64 | |
- rpi-basic-armhf | |
- rpi-basic-aarch64 | |
- rpi-firewall-aarch64 | |
- rpi-k0s-controller-aarch64 | |
- rpi-ruuvi-armhf | |
- rpi-snapcast-client-armhf | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build ${{ matrix.image }} | |
env: | |
# from `wpa_passphrase test_essid supersecret` | |
HL_WIFI_SSID: "test_essid" | |
HL_WIFI_PSK: "40faa8d23b3cf02b10e0f06cd69e179dfad59db25761909c3ecfdaa49bad53d0" | |
run: make ${{ matrix.image }} | |
- 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: build-images | |
runs-on: ubuntu-20.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 |